The appointment of former Brazilian president Luiz Inacio Lula da Silva as chief of staff by his successor, Dilma Rousseff has been blocked by a federal judge in the capital Brasilia.
The federal judge issued an injunction on Thursday saying that the appointment could derail a judicial investigation against the former president.
Lula da Silva is being investigated for allegedly benefiting from a bribery scheme. Prosecutors investigating corruption at the state oil company, Petrobras, last week charged him with fraud and money laundering.
The government has said it would appeal the court’s decision.
Under Brazilian law, cabinet ministers can only be investigated by the Supreme Court and not federal courts.
Lula da Silva’s appointment is thus seen as a move by the government to shield him from prosecution in the corruption scandal code-named Operation Car Wash.
But President Rousseff said that protecting Lula from prosecution was not the motivation for the appointment.
“Lula’s arrival in my government strengthens it and there are people who don’t want it to be stronger,” the BBC quoted her as saying.
On March 4, Lula was briefly detained and questioned over allegations of money laundering connected to Operation Car Wash, a massive investigation into corruption at the state oil giant, Petrobras.
He denies the allegations and said they are aimed at preventing him from running for president again in 2018.
His appointment has however sparked protests in several cities with those supporting him and those against him pouring out onto the streets.
In a taped telephone conversation released by the judge overseeing the investigation, Ms Rousseff offered to send Lula a copy of his appointment “in case of necessity” – interpreted by some as meaning in case he needed it to avoid arrest.