Former Brazilian president Luiz Inácio Lula da Silva has been named chief of staff in the government of Dilma Rousseff, as the embattled leader reshuffles her cabinet in a desperate attempt to stay in office.

The decision means that the former president, currently under criminal investigation for corruption and money-laundering, will not have to face any eventual trial in an ordinary criminal court. As a government minister, he will be entitled to the so-called “privileged forum” of a hearing in Brazil’s supreme court.

While the decision will help to shore up support for Rousseff’s flailing government among the trade union movement and others loyal to the former president, it will enrage yet further the anti-government movement that took to the streets on Sunday in the country’s largest ever protests.

Speaking to the Rio-based O Globo newspaper before the announcement, Carla Zambeli, from Aliança Nacional, one of the groups behind Sunday’s demonstrations, said: “If Lula takes office, we are going to bring Brazil to a halt.”

Lula’s appointment was confirmed by the presidential palace on Wednesday.

Rumours of the decision had circulated for days, causing a drop in the value of the Brazilian currency, the real, and the stock market, as investors fear his appointment marks a move to the left in terms of economic policy.

The once popular former leader, who left office in 2010 with approval ratings of more than 80%, has seen his reputation plummet in recent months, as allegations surfaced that he had received benefits-in-kind from construction companies implicated in Brazil’s worst corruption scandal. He has denied all charges against him.

Pixuleco, an inflatable doll depicting Lula, is seen during São Paulo protests calling for President Rousseff’s impeachment. Photograph: Paulo Whitaker/Reuters

On 4 March, police briefly detained Lula for “coercive questioning” over his use of a luxury beachside apartment and a farm in the interior of São Paulo state, which prosecutors allege were refurbished and gifted to him, despite being officially registered to others.

The detention of the former president represented the 24th phase of Operation Lava jato (car wash), a two-year inquiry into corruption at Petrobras, the state-run oil company, which has resulted in the convictions of dozens of Brazil’s top business executives. Almost 50 serving politicians are under investigation.

Brazil is experiencing its worst recession for at least 25 years: its economy shrank 3.8% last year, and the forecast for 2016 is similar. Amid these economic woes, Rousseff has been struggling with approval ratings hovering around the single-figures mark for the past six months.

Her government is reliant on a complex coalition of competing political parties, many of which have been implicated in the scandal. As such, she has found it difficult to pass legislation that would address Brazil’s economic crisis.

In December, the speaker of the lower chamber of congress, Eduardo Cunha, initiated impeachment proceedings against the president, who is accused of illegally using state banks to plug budget shortfalls.

Rousseff also faces being stripped of her mandate in the country’s top electoral court, after allegations that her 2014 presidential campaign used funds from the Petrobras corruption scheme. She denies all wrongdoing and has refused to step down.

As news of Lula’s appointment came through on Wednesday, Valor, a respected economic newspaper, reported that Alexandre Tombini, the president of Brazil’s central bank, was to resign. He was reportedly unhappy at what the appointment of Lula would mean for the government’s economic policies.