Supporters of Brazil's former President Luiz Inacio Lula da Silva shout

SAO PAULO (AP) — The Latest on Brazilian former President Luiz Inácio Lula da Silva (all times local):

6:45 p.m.

Venezuelan President Nicolás Maduro is celebrating former Brazilian President Luiz Inácio Lula da Silva's release from jail as a step toward rebuilding unity in South America.

Maduro Friday afternoon narrated the breaking news in Brazil during his own broadcast on state TV from Caracas. 

The socialist Venezuelan president calls Da Silva a great leader of Brazil, Latin America, the Caribbean and the world. 

Da Silva left the jail where he had been detained since April 2018 after a judge ordered his release. The judge's order followed a Supreme Court ruling that a person can be imprisoned only after all appeals to higher courts have been exhausted.

Da Silva is still appealing the case that put him behind bars, related to the alleged purchase of a beachfront apartment in Sao Paulo state.

___

5:45 p.m.

Former Brazilian President Luiz Inácio Lula da Silva has left the jail where he had been detained since April 2018.

Da Silva embraced his girlfriend Friday as he came out of the federal police building in Curitiba.

Hundreds of people gathered outside the building cheered and applauded the former leader.

A Brazilian judge ordered his release early Friday after the Supreme Court ruled that a person can be imprisoned only after all appeals to higher courts have been exhausted.

Da Silva is still appealing the case that put him behind bars, related to the alleged purchase of a beachfront apartment in Sao Paulo state.

Da Silva, who governed from 2003 to 2010, had been favored to win the 2018 presidential election, but his conviction prohibited him from running.

___

1:30 p.m.

Brazil's Supreme Court delivered a ruling that could release almost 5,000 inmates still appealing their convictions, including former President Luiz Inácio Lula da Silva and other powerful figures jailed in a sprawling corruption investigation.

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 appears to cover Da Silva, whose attorneys said they will request his release Friday. That move will initially depend on a judge based in the southern city of Curitiba, where the former president is jailed.

The ruling also covers others convicted in cases arising from the so-called 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 Car Wash probe said in a statement the top court's decision "goes against the sentiment of repudiating impunity and the fight against corruption."

Supporters of Da Silva celebrated the ruling, holding up signs saying "Lula," the name by which the president who governed from 2003 to 2010 is universally known here.

Supporters of jailed former President Luiz Inacio Lula da Silva, celebrate a Supreme Court decision that may free Da Silva, outside Brazil's Supreme Court, in Brasilia, Brazil, Thursday, Nov. 7, 2019. Brazil's top court has reached a narrow decision that could release almost 5,000 inmates that are still appealing their convictions, including Da Silva. The country's Supreme Court decided by 6 votes to 5 on Thursday that a person can only be jailed after all appeals to high courts have been exhausted. (AP Photo/Eraldo Peres)
A supporter holds a doll depicting jailed former President Luiz Inacio Lula da Silva, outside Brazil'sSupreme Court in Brasilia, Brazil, Thursday, Nov. 7, 2019. The Supreme Court will resume debate over if it’s legal (as is done currently) to jail a person who fails to overturn their conviction in a higher court. The decision could affect cases like that of Da Silva. (AP Photo/Eraldo Peres)
A supporter of jailed former President Luiz Inacio Lula da Silva, stands outside Brazil's Supreme Court in Brasilia, Brazil, Thursday, Nov. 7, 2019. The Supreme Court is resuming debate over if it’s legal (as is done currently) to jail a person who fails to overturn their conviction in a higher court. The decision could affect cases like that of Da Silva. (AP Photo/Eraldo Peres)
Workers' Party members gather to show support for Brazil's jailed, former President Luiz Inacio Lula da Silva, outside the Supreme Court in Brasilia, Brazil, Thursday, Nov. 7, 2019. Judges are debating whether a defendant is to begin serving his sentence after a conviction has been reached by the first appellate court, which could affect cases like that of Da Silva. (AP Photo/Eraldo Peres)
President of Brazil's Federal Supreme Court Dias Toffoli arrives for the debate on whether a defendant is to begin serving his sentence after a conviction has been reached by the first appellate court, in Brasilia, Brazil, Thursday, Nov. 7, 2019. The Supreme Court's decision could affect cases like that of jailed former President Luiz Inacio Lula da Silva. (AP Photo/Eraldo Peres)
President of Brazil's Federal Supreme Court Dias Toffoli, left, talks with Minister Marco Aurelio, rapporteur of the process, before a session to debate on whether a defendant is to begin serving his sentence after a conviction has been reached by the first appellate court, in Brasilia, Brazil, Thursday, Nov. 7, 2019. The Supreme Court's decision could affect cases like that of jailed former President Luiz Inacio Lula da Silva. (AP Photo/Eraldo Peres)
Police form a cordon between supporters of jailed former President Luiz Inacio Lula da Silva and President Jair Bolsonaro, as both groups keep vigil outside the Supreme Court in Brasilia, Brazil, Thursday, Nov. 7, 2019. Brazil’s highest court reached a narrow decision that could release almost 5,000 inmates who are still appealing their convictions, including jailed former President Luiz Inácio Lula da Silva. The country’s Supreme Court decided on a 6-5 vote Thursday night that a person can be imprisoned only after all appeals to higher courts have been exhausted. (AP Photo/Eraldo Peres)
Supporters of Brazil's President Jair Bolsonaro hold Brazilian national flags as they keep vigil outside the Supreme Court in Brasilia, Brazil, Thursday, Nov. 7, 2019. Brazil’s highest court reached a narrow decision that could release almost 5,000 inmates who are still appealing their convictions, including jailed former President Luiz Inácio Lula da Silva. The country’s Supreme Court decided on a 6-5 vote Thursday night that a person can be imprisoned only after all appeals to higher courts have been exhausted. (AP Photo/Eraldo Peres)