Lula leads in the polls but is serving a 12-year sentence for corruption and money laundering. Lula said his trial was engineered by rightwing elites to stop him winning.
Photograph: Ueslei Marcelino/Reuters

As thousands of his supporters rallied in Brazil’s capital city on Wednesday, former president Luiz Inácio Lula da Silva officially registered his candidacy for October’s presidential election from behind bars.

Lula leads in the polls, but is serving a 12-year prison sentence for corruption and money laundering, which electoral judges have said makes him ineligible under a “clean slate” law.

Trump of the tropics: the 'dangerous' candidate leading Brazil's presidential race

Read more

“If Lula is not a candidate – and I think there is a 90% he won’t be – that turns the election upside down,” said David Fleischer, an emeritus professor of political science at the University of Brasília.

In one polling scenario, a fifth of voters said they would vote for nobody at all in the election’s first round on 7 October. Running second in the polls is Jair Bolsonaro, a far-right retired army captain and lawmaker.

If and when Lula is excluded from the race, his vice-presidential candidate Fernando Haddad, the former mayor of São Paulo, is expected to take his place. Manuela D’Avila, a communist party legislator, will then become Haddad’s deputy.

Haddad read a letter from Lula to supporters gathered outside the electoral court. "Let’s talk to those who saw that Brazil has lost its way, who are without hope but who know the country needs to resolve its destiny in the balleto box, not in coups,” Lula wrote. “To remember that with democracy, with our work, Brazil will be happy again.”

But while Lula was able to get his protege Dilma Rousseff elected in 2010, there are doubts as to whether he can pull off the same trick for Haddad from prison, said Fleischer. In one polling scenario without Lula, Haddad lies fifth with just 6%.

Leading that polling scenario – with 21% – was Bolsonaro, who has a tiny party behind him and just eight seconds of television advertising time. His social media operation and aggressive law-and-order stance have won support among conservative Brazilians angered by corruption scandals and rising crime – and undeterred by his praise for Brazil’s former military dictatorship.

“I bet [Bolsonaro] gets to the runoff vote on October 28. But I don’t think he will win,” said Paulo Baía, a professor of political science at the Federal University of Rio de Janeiro.

Geraldo Alckmin, the rightwing former governor of São Paulo state, is another contender, Baía said. In one polling scenario, he technically draws with Bolsonaro in a runoff vote. And after doing deals with a block of pork-barrel, centrist parties, he has more television advertising time than any other candidate.

“Alckmin has the biggest party structure, the biggest TV time and the biggest financing resources,” Baía said. “Historically this has worked.”