Former Brazilian president Luiz Inacio Lula da Silva has been released from prison.

Hundreds of supporters greeted the politician outside the facility in the southern city of Curitiba on Friday after the South American country’s Supreme Court ruled a person can be imprisoned only after all the appeals have been exhausted.

The 74-year-old is appealing his conviction of corruption and money laundering in connection with the purchase of a beachfront apartment in Sao Paulo state.

A stage was set up for him to address the crowd.

Mr Da Silva, who is universally known as Lula, tweeted “Lula Free” with a video of himself working out and lifting weights in a gym inside the prison, where he has been detained since April 2018. Still, he could find himself back in prison if his appeals don't go his way.

It is not yet clear what political role Lula will seek to occupy now that he is free. The former leader of the leftist Workers' Party, better known in Brazil by its Portuguese acronym PT, remains a popular figure on the left, whose politicians and voters have ceaselessly called for his release.

Political analysts believe the release could rally the opposition, which has been demoralised by the corruption scandals, impeachment of Lula’s hand-picked successor, his imprisonment and, more recently, a clobbering in the 2018 general elections.

Aside from his promise to root out corruption and curb violence, far-right president Jair Bolsonaro ran a strong campaign on anti-Workers Party sentiment. He won the election with 55% of the vote and was sworn in on 1 January.

Lula, who governed from 2003 to 2010, had been favoured to win the 2018 presidential election, but his conviction eventually prohibited him from running.

The former president has said that when free, he would travel around the country rallying opposition. Political analysts say he might not immediately enter into frontal opposition with Mr Bolsonaro, seeking instead to influence the next presidential election in 2022.

“The thing that makes Lula most dangerous to Bolsonaro is that Lula understands the long game,” said James Bosworth, founder of Hxagon, a political risk analysis firm, stressing that the politician had run four times before being first elected in 2003.

“Lula is an old school union and political organisers who is going to take his time placing PT and other allies into positions to take advantage of Bolsonaro's weaknesses in the coming years,” he said.

The former union leader is widely referred to as a “political animal”. He presided over a period of rapid economic growth fuelled by a commodities boom that expanded the country's middle class.

His huge Bolsa Familia welfare program helped lift millions from poverty, and he left office with an approval rating above 80 per cent. His impassioned oratory can just as easily elicit laughter or tears from those among his supporters.

For Claudio Couto, a professor in political science at the Fundacao Getulio Vargas university in Sao

hand, it ends the PT's 'Free Lula' rhetoric, and forces the party to take on another agenda.“

Left-leaning supporters hailed the release of their standard-bearer, but want more and are now advocating for his name to be cleared.

While he is out of jail, the former leader remains entangled in several court cases.

Aside from the beachfront apartment, he was also sentenced by a lower court judge in a case regarding alleged ownership of a farmhouse in Atibaia, outside Sao Paulo.

He has denied any wrongdoing in both cases and accuses Car Wash prosecutors and then-judge Sergio Moro, now Justice Minister, of political persecution.

In a separate Supreme Court debate, justices will decide whether Mr Moro was biased when he delivered his rulings. In the meantime, his conviction regarding the apartment continues to bar Da Silva from running for office.

Protests in major Brazilian cities have been scheduled for this weekend, aimed at showing support for Mr Moro and his crusade to decrease crime and endemic corruption.

With Lula’s release, attacks on the Supreme Court’s ruling will doubtless feature loudly.

Associated Press