BRASILIA (Reuters) - A Brazilian appeals court judge on Monday released former President Michel Temer from jail following his high-profile arrest on graft charges last week, which marked a fresh landmark in the country’s battle against political corruption.

FILE PHOTO: Brazil's former President Michel Temer is seen at the Federal Police headquarters in Rio de Janeiro, Brazil March 21, 2019. REUTERS/Ricardo Moraes/File Photo

Federal prosecutors have accused Temer, who was president from 2016 to 2018, of leading a “criminal organization” that had received or arranged for up to 1.8 billion reais ($472 million) in bribes through various kickback schemes.

He has denied any wrongdoing and his lawyers appealed for his release, arguing that he could be tried while free. He left the federal police station where he had been held in downtown Rio de Janeiro on Monday evening to cries of “thief” from various protesters.

Judge Ivan Athié of the TRF-2 federal appeals court said in his ruling that the evidence provided by investigators did not justify the “preventive” jailing of Temer and seven other defendants, including former minister Wellington Moreira Franco.

“You have here old facts, involving possibly illegal acts, but no evidence of repeated criminality after 2016 or any other factor that justifies preventive imprisonment,” wrote Athié.

The federal prosecutor’s office said in a statement it would appeal the judge’s decision, and hoped its request would be heard by the full bench of the appeals court on Wednesday.

Temer’s lawyer, Eduardo Carnelós, praised Athié’s decision and criticized prosecutors who, he said in a statement, “violate the most vicious notions of law, and vilify the honor of honest people to deprive them of their freedoms.”

Former government minister Moreira Franco and seven other people who had been arrested as part of the probe were also ordered freed by Athié.

Brazil’s sweeping “Car Wash” probe has uncovered what U.S. prosecutors called the world’s largest graft scheme, starting with political bribery involving state-run oil company Petroleo Brasileiro SA and spreading to other sectors and public works.

Over 150 powerful politicians and businessmen have been convicted in connection to the investigation since 2014, which has reshaped the country’s political and business landscapes.

Temer is the second former president to be arrested in the anti-corruption push. Former President Luiz Inacio Lula da Silva is in jail serving over 12 years for a corruption conviction.

Voters’ anger over long-running graft fueled the ascent of President Jair Bolsonaro, a far-right politician who served 30 years as a fringe lawmaker, but rose to power on the back of pledges to end graft in Brasilia.

The arrest of Temer on Thursday had added to a selloff in Brazilian financial markets last week, stirring concerns that the case could distract Congress from major economic reforms.

The Bovespa stock index erased losses on the news of Temer’s release, trading in line with Friday’s close. Brazil’s real jumped 1.4 percent and posted its biggest one-day gain in nearly three months.