A Brazilian Supreme Court judge on Monday overturned the graft convictions against former president Luiz Inacio Lula da Silva, clearing the way for the left-wing leader to run in the 2022 presidential election.

Justice Edson Fachin overturned all convictions against the popular-but-tarnished ex-president (2003-2010), stemming from a probe into a massive corruption scheme centered on Brazilian state oil company Petrobras.

Fachin ruled the court in the southeastern city of Curitiba that convicted Lula "lacked jurisdiction," and sent a total of four related cases against him to a federal court in the capital, Brasilia.

Lula, 75, regains the right to run for office unless the convictions are reinstated.

The decision, which was procedural, did not go into the merits of the cases.

The prosecutor general's office said it would appeal.

The full Supreme Court could overturn Fachin's ruling, though legal experts said that was unlikely.

"This is recognition that we were right throughout this long legal battle," Lula's lawyers said in a statement.

They called the decision vindication of their arguments: "ex-president Lula's innocence, the invalidity of the cases and the 'lawfare' that was waged against him."

The cases stem from Operation Car Wash, a sprawling anti-corruption investigation that brought down a Who's Who of powerful politicians and business executives in Brazil, jailed for using inflated construction contracts to systematically fleece Petrobras for billions of dollars.

Lula, who spent more than 18 months in prison before being freed in 2019 pending appeal, was the most powerful figure felled.

Prosecutors accused him of using the corruption scheme to take bribes, remodel a triplex beach apartment and channel illegal funds to his foundation.

His image was badly tarnished by the convictions, which resulted in jail sentences totaling 26 years.

Still, an opinion poll published Sunday gave Lula the most potential votes in the October 2022 presidential elections -- the only politician to outperform far-right incumbent Jair Bolsonaro.

Reacting to the ruling outside the presidential palace, Bolsonaro accused the judge of bias.

Former Brazilian president Luiz Inacio Lula da Silva, shown here in 2019, has had his graft convictions overturned
Former Brazilian president Luiz Inacio Lula da Silva, shown here in 2019, has had his graft convictions overturned AFP / HENRY MILLEO

"Edson Fachin always had strong ties to the PT" -- Lula's Workers' Party -- "so a decision like this doesn't surprise us," he said.

"But the (Lula) government's robbery is plain for all to see... I don't think the Brazilian people even want a (PT) candidate in 2022, much less him."

Lula claims he is innocent, and that the cases against him were fabricated to take him out of the running for Brazil's 2018 presidential race.

That election was ultimately won by Bolsonaro, who capitalized on a massive backlash against the PT.

Lula supporters have long cried foul.

They point to the fact that the lead judge in the Car Wash probe, Sergio Moro, went on to accept the post of justice minister under Bolsonaro, and that hacked phone messages show he conspired with prosecutors to ensure Lula was sidelined.

Social media in Brazil erupted with pictures of Lula donning a pair of red sunglasses or tearing into a punching bag with boxing gloves on.

Leftist Argentine president Alberto Fernandez hailed the ruling, tweeting, "Justice has been done!"

"The 2022 election started today," opinion columnist Thomas Traumann wrote on Twitter.

"If you thought Brazil was politically polarized before, take a seat, because the show's just getting started."

Lula remains a hero on the left, and many Brazilians fondly recall the economic boom he presided over, as well as social programs that helped lift millions of people from poverty.

But his vindication is far from complete. The former metal worker-turned-president still faces several other corruption and influence-peddling cases, aside from the Operation Car Wash charges.

And he remains highly controversial -- so much so that the Sao Paulo stock exchange plunged by four percentage points after news of the court decision broke.

The former president's press office said he had no immediate comment on the ruling.