BRASILIA (Reuters) - Brazil’s top electoral court has been handed a hot potato as it must decide whether the country’s most popular politician can run in upcoming elections despite being jailed for corruption.

Brazil's former Foreign Minister Celso Amorim show a message of Pope Francis written on a book on Brazil's former President Luiz Inacio Lula da Silva after visiting him at the he Federal Police headquarters in Curitiba, Brazil August 16, 2018. REUTERS/Rodolfo Buhrer

The court is expected to declare former President Luiz Inacio Lula da Silva ineligible in the coming weeks, ahead of the Oct. 7 vote, but that may not stop his Workers Party (PT) winning anyway.

Justice Rosa Weber, who heads the court, has said it will quickly make a decision that political analysts expect will come before campaign advertising on TV and radio begins on Aug. 31.

Few in Brazil doubt Lula will be barred from running under a “Clean Slate” law that bans politicians from seeking public office if they have been convicted of a crime and it has been upheld on appeal.

“There is no doubt he will be disqualified. It is a legal fact. After all it was he who signed the Clean Slate into law,” said Senator Katia Abreu, a farm lobby leader and vice presidential candidate for PT rival the Brazilian Labor Party.

If the electoral court bans Lula, his lawyers are expected to appeal to the Supreme Court.

That could suspend his ban, which could delay his case beyond a Sept. 17 deadline for changing names on the ballot.

Slideshow ( 5 images )

“Lula will try to delay a final ruling as far as possible, but the Supreme Court will uphold the TSE decision,” said Ricardo Ismael, politics professor at the Catholic University of Rio de Janeiro.

The PT registered the leftist leader’s candidacy on Wednesday, with thousands of supporters chanting “Free Lula” outside the electoral court. Lula’s running mate Fernando Haddad, a former Sao Paulo mayor, will head the ticket if he cannot run.

INHERITING LULA’S VOTES

In Brazil’s most uncertain election in decades, Haddad is running a distant sixth in polls, far behind front-running far-right candidate Jair Bolsonaro, who has capitalized on voter anger with political corruption and rising crime.

With Lula’s endorsement, Haddad would become a competitive candidate if he is able to attract a good part of the popular leftist’s voters. Lula leads all polling when his name is included, taking about 30 percent of the vote, according to pollster Datafolha.

In a fragmented field of 13 presidential hopefuls, Haddad could make the run-off between the two most voted candidates with as little as 15 percent of the votes, experts say.

“If Haddad can transfer half of Lula’s 30 percent, he can become a competitive candidate and get to the second round,” said Lucas de Aragão, at Brasilia consultancy Arko Advice.

Voters in the poorest region of Brazil, Lula’s native Northeast, which accounts for 26 percent of the electorate, remain extremely faithful to the president who greatly improved their quality of life and purchasing power, Ismael added.

Abreu argued that Haddad was an unknown quantity in the Northeast and that voters will back her presidential candidate, center-leftist Ciro Gomes, who is also from the Northeast, or the environmentalist Marina Silva.

“Nobody votes by power of attorney. They cannot even pronounce Haddad’s name properly in the Northeast,” she said.