A judge in Brazil on Friday authorised the release of jailed ex-president Luiz Inácio Lula da Silva, after a Supreme Court ruling paved the way for thousands of convicts to be freed.
The order 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.
Federal police have to comply with Friday's order "with urgency", the decision says.
Lula has been detained since April 2018 after being convicted of corruption and money-laundering.
The former president is still appealing the case that put him behind bars, related to the alleged purchase of a beachfront apartment in São Paulo state.
The former leader, who governed from 2003 to 2010, had been favoured to win the 2018 presidential election, but his conviction prohibited him from running.
The Supreme Court's key ruling could see the release almost 5,000 inmates still appealing their convictions.
The court decided in a 6-5 vote late Thursday that a person can be imprisoned only after all appeals to higher courts have been exhausted.
The decision appeared to cover Lula, whose attorneys said they would immediately request his release.
The ruling also covers others convicted in cases arising from the so-called 'Lava Jato' ("Car Wash") investigation, which has ensnared dozens of top politicians and business leaders in Latin America's largest nation. They will now be able to seek release.
Prosecutors from the Lava Jato probe said in a statement the top court's decision "goes against the sentiment of repudiating impunity and the fight against corruption."
The former president was convicted of corruption and money-laundering in connection with the purchase of a beachfront apartment in the seaside city of Guaruja, in São Paulo state. Prosecutors successfully argued the apartment was promised as a kickback from a construction company. Its former CEO said the apartment was reserved for Lula.
The 3,197-square-foot (297-square-metre) apartment in the Solaris complex faces Asturias Beach, one of the busiest in Guaruja.
Lula appealed his conviction but it was upheld last year, and he was put behind bars in April 2018. Per a Supreme Court determination in 2016, criminals whose convictions were upheld on appeal could begin serving their sentences.
The former president is now appealing to higher courts. He maintains that he was framed by his political opponents.