A Brazilian court ordered former president Michel Temer's release from jail with conditions on Tuesday, less than a week after he was detained for a second time in a case related to a corruption scandal that has ensnared several high-profile South American politicians.
Four judges on the Superior Court of Justice unanimously voted in favor of granting a habeas corpus release to Temer, president from 2016 to 2018, for the second time since March.
The ruling was set to take effect within hours, with conditions of release including a freezing of Temer's assets and the seizure of his passport.
Temer, 78, turned himself in to Sao Paulo federal police Thursday after an appellate court ordered his return back to prison as part of an investigation into alleged bribes made in 2014 in exchange for work contracts at the Angra 3 nuclear power plant in Rio de Janeiro state.
He was originally arrested in March and placed in preventative detention when the prosecutor's office accused the former president of leading a 40-year criminal organization, though that decision was overturned days later by another judge, citing a lack of legal justification.
Temer's case is part of the sprawling Operation Car Wash scandal, which has uncovered a vast network of bribes paid by large construction companies such as Odebrecht to politicians to obtain contracts.
Senior politicians in countries such as Brazil, Ecuador and Peru have been caught up in the scandal.
Five lawsuits and one investigation are open against centre-right Temer, who served as vice president to his left-wing predecessor Dilma Rousseff and was succeeded by far-right President Jair Bolsonaro. The cases and probe focus mainly on corruption and money laundering charges.