CURITIBA, Brazil (Reuters) - Brazil’s most popular politician, imprisoned former president Luiz Inacio Lula da Silva, on Tuesday ended his legal battle to run for the top office in next month’s election.

Senator Gleisi Hoffmann, head of the leftist Workers Party (PT) that Lula founded, made the announcement in the southern city of Curitiba, where Lula has been jailed on corruption charges since April.

Lula had stepped aside to allow running mate Fernando Haddad to stand for the presidency, Hoffman said. A letter from the ex-president was read out to supporters who have been keeping vigil outside the federal police headquarters where Lula - who maintains his innocence - is being held.

“A man can be unjustly imprisoned, but not his ideas,” Lula wrote in the letter, read aloud by founding PT member Luiz Eduardo Greenhalgh. “We are millions of Lulas and from today Fernando Haddad will be Lula for millions of Brazilians.”

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.

Support for Haddad, a 55-year-old former mayor of Sao Paulo, is rising, according to opinion polls released this week, but he does not have the national name recognition of Lula and still lags his rivals.

The polls, which also showed support for other leftist candidates increasing, sent Brazil’s currency and stocks down.

Slideshow ( 3 images )

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.

PASSING THE BATON

Lula had hoped the Supreme Court would agree to an appeal for more time after the top electoral court last week gave the party until Tuesday to decide on its candidate.

But he finally decided it was time to pass the baton to Haddad on the deadline set by the court and not run the risk of votes for his party’s ticket being annulled by the electoral court.

Slideshow ( 3 images )

Lula, who controls the PT he founded and determines its election strategy from his jail cell, has kept his candidacy alive for as long as possible, hoping to maximize the transfer of votes to Haddad.

Monday’s Datafolha poll showed that transfer has begun. While still in the single digits, support for Haddad increased from 4 percent to 9 percent, the biggest gain among the 13 candidates running for president.

The same poll also showed strengthening support for another leftist, Ciro Gomes, while far-right law-and-order candidate Jair Bolsonaro increased by 2 percentage points to 24 percent, less than many expected after he survived a near-fatal stabbing last week.

Monday’s poll also confirmed previous surveys showing Bolsonaro would lose to every major candidate in a probable run-off vote - with the exception of Haddad, with whom he was in a technical tie.

A separate survey released on Tuesday by the Ibope polling firm showed Bolsonaro in a technical tie with all rivals in simulated second-round votes, and easily leading in the first-round ballot.

The potential for a leftist run-off victory spooked financial markets on Tuesday, with the real currency slumping 1.6 percent against the U.S. dollar and the Bovespa benchmark stock index down 2.3 percent.

“Bottom line: one space in the run-off looks guaranteed for Bolsonaro,” Juliano Ferreira, a strategist at brokerage BGC Liquidez, said in a research note. “Once he’s there, his chances of losing look stronger, to whomever it might be.”