Brazil’s most popular politician, imprisoned former President Luiz Inacio Lula Da Silva has ended his legal battle to run for the top office in next month’s election.

A letter from Lula announcing he would step aside to allow his running mate Fernando Haddad to stand for the presidency was read out to supporters who have been keeping vigil outside the federal police headquarters where Lula – who maintains his innocence – is being held.

Lula, serving a 12-year sentence for a graft conviction, was president from 2003-2010. He is ineligible for office under Brazil’s “clean slate” law, which prohibits candidates from running if they have convictions that have been upheld on appeal.

According to opinion polls support for Haddad, a 55-year-old former mayor of Sao Paulo, is rising. But he does not have the national name recognition of Lula and still lags his rivals.

Haddad will need all the political power that Lula’s backing can offer to make it into a likely runoff vote, which would take place between the top two finishers in the Oct. 7 first round ballot if none wins a majority.

Haddad’s running mate is Manuela D’avila, 37, a member of the communist party of Brazil.

Polls have shown that about half of Lula’s legion of followers are likely to vote for whomever he names as his successor atop the pt ticket.