Former Brazilian president Luiz Inacio Lula da Silva has accepted an offer to become the chief of staff for his former protégé, the current president Dilma Rousseff.
The move is a high stakes political gamble designed to help Rousseff fight back against impeachment proceedings currently in congress that were boosted by massive anti-government protests last Sunday.
Becoming a member of the government will also provide Lula with short-term protection from possible prosecution over corruption allegations currently in Brazilian courts.
"It's an extremely risky move for both of them, in the sense of being a 'winner-takes-all' strategy," said Gabriel Petrus, a political analyst with Barral M Jorge consultancy firm based in the capital Brasilia.
The new appointment was first announced on Twitter by Workers' Party leaders after Lula, who was president from 2003 to 2011, met with Rousseff on Wednesday morning. The breakfast encounter followed a four-hour meeting on Tuesday night.
Lula's new job comes as momentum is gathering behind moves to impeach Rousseff over her alleged role in fiddling the government accounts to cover up excessive spending ahead of her reelection in 2014.
The position of chief of staff appears designed to give the hero of the Workers' Party a strategic role in negotiating with Brazil's other political parties that now hold the president's future in their hands.
"Dilma is preparing herself for the impeachment battle and Lula would be the best soldier she could have now," said Petrus, the political analyst. "It's also a move to try to revamp her government after the protests. It is a high level response."
The formal impeachment process, that began in congress in December, had appeared to be stalling until politicians noted the size of anti-government protests that brought millions onto the streets around the country on Sunday. Rousseff is deeply unpopular because of Brazil's struggling economy that shrank by 4 percent last year.
Sources within the Brazilian Democratic Movement Party, the ruling coalition's biggest partner, told Reuters this week that the protests prompted members to favor moving ahead with the impeachment process. Congress is expected to begin the election of a special commission to judge the case later this week.
Rousseff had reportedly already sought to enlist Lula's help, but the former president had previously declined her offers of cabinet positions. His change of heart seems linked to corruption charges filed against him last week before a judge in São Paulo.
The final push appears to have come from the subsequent decision to pass the case on to the federal judge presiding over the historic Lava Jato, or Car Wash, investigation that uncovered a $2 billion bribery scandal centered on the state-owned oil company Petrobras.
As a member of the government, Lula can now only be tried by the country's Supreme Court.
The charges relate to allegations that Lula hid the acquisition of a penthouse, which was registered to engineering contractor OAS. OAS is one of the companies linked to the Lava Jato investigation.
The transcript of Lula's questioning by police before he was charged was published in full on Monday. In it, he tells police that the investigation against him will make him more determined to run for president again, as many had expected he might.
"I will be presidential candidate in 2018," he said. "They will have to have courage to make me ineligible."
A pro-government rally, in defense of Lula and Rousseff, is expected to take place on Friday.
"By giving Lula a cabinet position, Rousseff is protecting her own reputation and legacy, as much as she is Lula's. It will undoubtedly buy time for both of them," said Lloyd Belton, Latin American political and country risk analyst at S-RM, a business intelligence and risk management consultancy. "However, if Lula was arrested and charged for corruption, it's difficult to see how Rousseff's government could possibly survive given that he's the bedrock of the Workers' Party."
Follow Donna Bowater on Twitter: @DonnaBow