Supporters of Luiz Inácio Lula da Silva protest against his conviction, which he seeks to overturn, in São Paulo.
Photograph: Stringer/Reuters

Brazil is bracing for a historic court decision which could remove the most popular leader in modern Brazilian history from an election he is currently poised to win – and may prove devastating to the leftwing Workers’ party he founded.

Nerves are stretched taut ahead of Wednesday’s appeals court decision, in which three judges will decide whether or not to uphold the conviction of former president Luiz Inácio Lula da Silva on corruption and money laundering charges.

Lula – who is still hugely popular after his 2003-2010 two-term presidency – is currently the early favourite in October’s presidential election.

Porto Alegre’s rightwing mayor Nelson Marchezan asked for the army to protect the city from thousands of Lula supporters expected to descend. The Workers’ party president, Gleisi Hoffmann, said last week that for Lula to be arrested, “they will have to kill people” – although she later qualified the remark.

Authorities have closed airspace over the court, sealed off the surrounding streets, and plan to deploy helicopters, elevated observation platforms and even rooftop sharpshooters.

Lula’s many enemies are already planning victory celebrations in a park on the affluent side of the city, but his successor Dilma Rousseff said upholding the conviction would stop Brazil reducing the brutal inequality her party fought since first winning election in 2002.

“We are looking at the future of our country,” she told the Guardian in an interview in Porto Alegre, where she now lives. “This is not a short-term conflict.”

Lula has consistently argued that the case is politically motivated to remove him from the presidential race. “What’s on trial isn’t Lula, it’s a government, it’s the way that we treat this country,” he told foreign journalists last week.

He was handed a nine-and-a-half-year sentence for corruption and money laundering in July by Sérgio Moro, a high-profile judge known for imposing tough sentences over a sprawling, multibillion-dollar graft case at state-run oil company Petrobras. Scores of powerful politicians and businessmen have been jailed as a result of the so-called Lava Jato (Car Wash) investigation.

Fury over the scheme, revealed in 2014, helped fuel massive street protests calling for the removal of Lula’s protege Rousseff – and also galvanised a resurgent Brazilian right.

Rousseff was eventually impeached in 2016, ostensibly for breaking budget rules, and was replaced by her former vice-president, Michel Temer, from the Brazilian Democratic Movement party (PMDB, since renamed MDB). Wiretaps later revealed PMDB politicians plotting to force Rousseff out in order to head off corruption investigations they themselves were implicated in.

Brazil's right on the rise as anger grows over scandal and corruption

Read more

Temer has since introduced severe austerity measures to combat public spending which had soared under Rousseff’s rule; poorer Brazilians have been hard hit by his cuts to social programmes.

Rousseff said the case against Lula, one of several, was part of the same conspiracy as her impeachment, which she described as a “coup” designed to dismantle the Workers’ party and introduce the market-friendly, “neo-liberal” agenda Temer is now pushing.

“We realised too late the rise of the extreme right within the PMDB. We had no notion,” Rousseff said.

She admitted her party had been involved in diverting some money, but said it was much less than others, like the PMDB. “Every party in this process had its deviations,” she said.

Lula was found guilty of receiving about £540,000 ($755,000) in bribes from a construction company called OAS in the form of a seaside duplex apartment renovated and swapped for a simpler apartment he had bought in the same building.

Prosecutors said the company paid nearly £20m in bribes for three fat Petrobras contracts.

Lula appealed, but the Porto Alegre court has upheld many of Moro’s sentences, and its president, Carlos Lenz, has praised his rulin .

Protesters in Porto Alegre, southern Brazil, rally in support of the former president on 21 January. Photograph: Jefferson Bernardes/AFP/Getty Images

The case has provoked outrage among Lula’s supporters, who point to a string of much graver allegations against his political rivals: £11m in cash was found in an apartment linked to a Temer minister; a rightwing senator, Aécio Neves, was recorded requesting a $450,000 bribe from a powerful businessman and Temer himself only avoided charges of corruption, racketeering and obstruction of justice after the lower house of congress twice voted to block them.

Human rights lawyer Geoffrey Robertson QC said Moro had failed to prove a link between the apartment and a specific act or decision by Lula.

“Moro hasn’t found the smoking gun, because it does not exist,” Robertson said in a statement.

Lula’s lawyers say that Lula never owned the apartment and described the case as a “legal farce” in a statement.

Operation Car Wash: The biggest corruption scandal ever?

Read more

Meanwhile, Brazilian leftists said losing Lula from the election would be a devastating blow for his Workers’ party.

“It would be a catastrophe,” said Jean Wyllys, a Rio de Janeiro lawmaker for the Socialist and Freedom party. “Our democracy is already in intensive care.”

Officially, the party has no “plan B” candidate, and Hoffmann told the Guardian they will push his candidacy right down to the wire.

But some party officials believe Lula’s growing popularity is enough to propel a last-minute substitute to victory if he ends up being removed from the race.

“He could. But sincerely, we made a deal not to talk about this,” said Jorge Branco, the party’s secretary for international relations for Rio Grande do Sul state.

Plenty of Brazilians blame Rousseff for a crippling recession Brazil has officially just emerged from and Lula for Brazil’s endemic culture of graft.

“Everything is connected to what they did to Petrobras,” said Mauro de Paiva, 53, a one-time Lula voter who lost his job at a Porto Alegre soccer team last year.

But conversely, Lula’s popularity has only risen in polls, with 49% saying they would vote for him over far-right candidate Jair Bolsonaro in a run-off vote in one December poll.