A federal judge in Brazil on Thursday blocked the appointment of former President Luiz Inácio Lula da Silva to a Cabinet-level position.

Lula, who is currently ensnared in a billion-dollar corruption scandal, had been sworn in hours earlier as President Dilma Rousseff’s chief of staff following the controversial announcement of his appointment earlier this week. Rousseff, who succeeded Lula as president, was his hand-picked successor.

On Wednesday night, a prosecutor released dozens of recorded phone calls including one that appeared to show Lula was seeking to use his Cabinet post to shield himself from prosecution—a revelation that prompted the federal judge to issue an injunction against the appointment.

According to news reports, in one taped conversation on Wednesday afternoon, Rousseff told Lula she would send him his ministerial credentials “in case of necessity,” widely interpreted to be a reference to Lula’s potential arrest or detainment. (Earlier this month, Lula, who is the most prominent of the dozens of politicians implicated in the scandal, was taken in for questioning by police.)

The government argues the conversation merely meant Lula might not be able to attend the swearing-in ceremony and officials have promised to appeal the injunction against Lula’s appointment. Indeed, in a previous conversation, also taped, Lula is heard telling Rousseff he “would never enter government to protect myself.”

Lula’s alleged participation in a kickbacks and money-laundering scheme involves Petrobras, the crown jewel of Brazil’s state-owned enterprises. The illegal actions are alleged to have taken place largely during Lula’s presidency from 2003 until 2010.

Brazil remains in the throes of a deep recession and anti-corruption sentiment has frequently materialized in the form of national protests. On Sunday, more than a million people around the country took to the streets in record demonstrations where calls were made for Lula to be arrested and for Rousseff to resign.

This scandal, which threatens Brazil’s government, ironically harkens back to a quote delivered by Lula himself nearly 30 years ago.

“In Brazil,” he said,  “when a poor man steals he goes to jail. When a rich man steals he becomes a minister.”