Judge issues unexpected ruling, saying all prisoners in Lula’s situation should be freed while appeals are under way.

A Brazilian Supreme Court judge has issued a surprise ruling that could lead to the release of former President Luiz Inacio Lula da Silva, who was jailed this year on a corruption conviction.

Lula was jailed in April after being sentenced to more than 12 years in prison, and faces six other trials for alleged corruption. He has maintained his innocence claim, dismissing the charges as a political plot against him.

Justice Marco Aurelio Mello’s decision on Wednesday suspends the enforcement of the same court’s earlier ruling that allows for convicts to be jailed after their sentence is upheld on the first appeal, as was the case with Lula.

Mello’s decision must next be considered by the full panel of the Supreme Court, which is divided on the issue of whether to allow those convicted to remain free until their case fully winds through Brazil‘s complex and backlogged legal system.

It is not yet clear if Lula could be freed from prison before the full court makes any decision, which would not happen until early next year, as the court goes into recess later on Wednesday.

If the decision stands, Lula could go free until he exhausts all appeals, a process which could take years.

Gleisi Hoffmann, who leads the leftist Workers Party that Lula founded, said via Twitter that the party had already filed legal requests before the top court to plead that Lula be freed.

The office of Brazil’s prosecutor general said it was studying Mello’s decision and weighing its options. Prosecutors strongly oppose any backtracking on the ability of lower courts to order convicts to prison after their conviction is upheld on a first appeal.

Brazil’s incoming justice minister Sergio Moro, the lower court judge who condemned Lula and who oversaw the trials resulting from the country’s sprawling “Car Wash” corruption investigations, has said he will introduce legislation to pass a law mandating that those convicted on appeal be sent to jail.

Lula was president from 2003 to 2010. He rode a commodities boom and used social policies that helped lift millions from poverty.

He easily led early polls for this past October’s presidential election and registered to run. But he was blocked from doing so by a law that strips those convicted of crimes upheld on appeal from running for office, a decision that would not be impacted by his possibly being freed.

If Lula is released, it would galvanise Brazil’s demoralised left, still reeling after October’s election of far-right president-elect Jair Bolsonaro, who has vowed to reverse policies instilled during Lula’s two terms.