Michel Temer was the second ex-president of the Latin American country to be caught up in a sprawling anti-corruption probe
A Brazilian appeals court on Wednesday ordered former president Michel Temer back to jail, an official said, weeks after the 78-year-old was freed by another judge.
The order by the Rio de Janeiro court "has immediate effect," a court official told AFP without providing more details.
Temer, who is accused of leading a sophisticated embezzlement and money laundering scheme, was arrested in Sao Paulo in March and placed in "preventative detention" in Rio.
But that decision was overturned days later by another judge, citing a lack of legal justification.
Temer was the second ex-president of the Latin American country to be caught up in a sprawling anti-corruption probe called Operation Car Wash that has claimed scores of political and corporate scalps.
Since 2014 the Car Wash probe has uncovered a vast graft operation involving state oil firm Petrobras and major construction companies and bribes to politicians of several parties.
More than 150 people have been convicted and hundreds more charged so far. The scale of the corruption uncovered has stunned Brazilians weary of graft among their leaders.