Protests have erupted across Brazilian cities after President Dilma Rousseff appointed her predecessor Luiz Inacio "Lula" da Silva as chief of staff and a taped conversation fed opposition claims the move was meant to shield the former leader from prosecution.

Tens of thousands of protesters on Wednesday took to the streets of the capital Brasilia and Sao Paulo, the country's financial hub, demanding Rousseff's resignation.

Critics said Lula's appointment as chief of staff could help him avoid possible detention in an expanding corruption investigation that has now touched the top of Brazil's political leadership.

"Brazil cannot continue with them any more," opposition politician Rubens Bueno said. "They are using their positions to stay in power at all cost."

But Rousseff rejected the accusations, saying Lula was chosen for his experience and strong record of championing sound economic policies.

"He is going to help; we are going to look at returning to growth, fiscal stability and controlling inflation," Rousseff said.

Meanwhile, the federal judge overseeing the graft probe said in a court filing released on Wednesday that taped telephone conversations showed that Lula and Rousseff considered trying to influence prosecutors and courts in favour of the former president.

He admitted, however, that there was no evidence they actually carried this out. One recording, made public by the court, showed Rousseff offering to send Lula a copy of his appointment "in case it was necessary".

Brazil recession

The head of the government coalition in the lower house of Congress, Jose Guimaraes, confirmed Lula's appointment on Twitter after a meeting of Rousseff, the former president and senior ministers on Wednesday morning.

The move offers Lula short-term protection from prosecutors who have charged him with money laundering and fraud.

Lula's return to government may also spell a change of economic tack, as he has openly criticised austerity efforts and called for more public spending to end Brazil's worst recession in decades.

Brazil's currency slid nearly 2 percent on Wednesday and has lost almost 7 percent this week as Dilma's invitation to Lula raised expectations of a sharp policy swing.

Fresh accusations

Lula's return to Brasilia on Tuesday was overshadowed by a barrage of fresh corruption accusations by Senator Delcidio do Amaral, a close Workers' Party ally of the president until he was arrested last year.

In plea bargain testimony, Amaral said Rousseff knew about a massive graft scheme at state-run oil company Petrobras and one of her ministers had tried to buy his silence.

BRAZIL: Central Bank chief, Alexandre Tombini, threatens to step down if Lula da Silva takes Cabinet position, according to media reports. — Gabriel Elizondo (@elizondogabriel) March 16, 2016

Rousseff's popularity has been pummelled by Brazil's worst economic downturn since the Great Depression and the two-year-old corruption investigation arising from Petrobras.

More than a million people marched in demonstrations across Brazil on Sunday, calling for Rousseff's impeachment and applauding the corruption probe that has turned up evidence of political kickbacks paid by Petrobras contractors.

Once appointed, Lula can only be tried in the Supreme Court, placing him out of the reach of ongoing state and federal probes.