A judge in Brazil on Friday authorised the release of jailed ex-president Luiz Inacio Lula da Silva, after a Supreme Court ruling paved the way for thousands of convicts to be freed.
Hundreds of supporters gathered outside the federal police headquarters in the southern city of Curitiba where Lula has been held since April 2018 cheered after the order was issued.
It came hours after Lula's lawyers requested the immediate release of the 74-year-old leftist icon, who has been serving a nearly nine-year sentence for corruption and money laundering.
Late Thursday, the Supreme Court overturned a rule requiring convicted criminals to go to jail after losing their first appeal. Lula is one of several thousand convicts who could benefit from the decision.
Those convicts would remain free until they had exhausted their rights to appeal -- a process critics say could take years in cases involving people able to afford expensive lawyers.
Many of those affected by the 6-5 ruling are political and business leaders caught up in a massive corruption probe dubbed Car Wash that began in 2014.
Lula was "very serene" and the Supreme Court ruling had given him "hope that there could be justice," his lawyer Cristiano Zanin said earlier.
"Our judicial battle continues, our focus is to get the legal case nullified."
Supporters hope Lula will "leave the room where he has been kidnapped for 580 days, walk among the people and come to the vigil, hug the people, and we hug him, to share this special moment," Roberto Baggio, coordinator of the Free Lula camp outside the jail, told AFP.
Lula, who led Brazil through a historic boom from 2003 to 2010, earning him the gratitude of millions of Brazilians for redistributing wealth to haul them out of poverty, is serving eight years and 10 months for corruption.
He was sentenced to almost 13 years in jail in February in a separate corruption case and still faces another half dozen corruption trials.
Lula has denied all the charges, arguing they were politically motivated to keep him out of the 2018 presidential election that was won by far-right President Jair Bolsonaro.
"I'm coming for you, wait for me!" Lula's girlfriend, Rosangela da Silva, tweeted after the Supreme Court announced its decision.
"If all the others did worse and are free, why not him too?" Eleonora Cintra, a 74-year-old resident of Sao Paulo, told AFP.
Bolsonaro has been unusually quiet about the court's ruling that could free his nemesis. But his sons have taken to Twitter to attack the decision.
"Thousands of prisoners will be released and rattle everyone, regardless of their political beliefs, generating serious internal and external social and economic reactions," Carlos Bolsonaro tweeted.
Justice Minister Sergio Moro, who convicted Lula when he was a judge in 2017, said the Supreme Court's decision must be respected, but he noted "Congress can modify the Constitution or the law" to allow the jailing of convicted criminals after their first appeal.
If he is freed, Lula's criminal record will prevent him from resuming his political career. He was the founder of the Workers Party (PT).
That could change, however, if the Supreme Court were to decide in a separate case that Moro had been biased.
Lula's release could invigorate the left and, paradoxically, also help Bolsonaro, who was swept to power in 2018 on a wave of anti-PT sentiment, said Thomaz Favaro of Control Risks consultancy.
"You will have Lula more present on the political scene and that allows Bolsonaro to reinforce his role as leader of the anti-PT field," Favaro said.