Brazil's Senate voted on Thursday to put leftist President Dilma Rousseff on trial in a historic decision brought on by a deep recession and a corruption scandal that will now confront Michel Temer, the vice president who succeeds her.
With Rousseff suspended during the Senate trial for allegedly breaking budget rules, the centrist Temer will take the helm of a country that again finds itself mired in political and economic volatility after a recent decade of prosperity.
The 55-22 vote ends more than 13 years of rule by the left-wing Workers Party, which rose from Brazil's labour movement and helped pull millions of people out of poverty before seeing many of its leaders face corruption investigations.
Fireworks rang out in some neighborhoods across Brazil after the vote at the end of a 20-hour session in the Senate.
Police had briefly clashed with pro-Rousseff demonstrators in Brasilia on Wednesday, exchanging volleys of tear gas and rocks.
The impeachment process began in the lower house of Congress in December and Rousseff, a 68-year-old economist and former Marxist guerrilla who was Brazil's first female president, is unlikely to be acquitted in a trial that could last as long as six months.
A two-thirds majority is needed in the Senate to convict her but the scale of her defeat in the vote on Thursday showed how little support she has.
"Today we are trying to overcome this situation by removing an irresponsible government. We have no alternative," said Senator Blairo Maggi, one of Brazil's biggest soy farmers, who is slated to become agriculture minister in Temer's government.
Rousseff has denied any wrongdoing and called her impeachment a "coup".
Temer, a 75-year-old centrist and constitutional scholar who spent decades in Brazil's Congress, now faces the challenge of restoring economic growth and calm at a time when Brazilians, increasingly polarized, are questioning whether their institutions can deliver on his promise of stability.
In addition to a towering budget deficit, equal to more than 10 percent of its annual economic output, Brazil is suffering from rising unemployment, plummeting investment and a projected economic contraction of more than 3 percent this year.
"Only major reforms can keep Brazil from moving from crisis to crisis," says Eduardo Giannetti da Fonseca, an economist and author in São Paulo who has written extensively about the country's socioeconomic problems.
But those changes, including an overhaul of pension, tax and labor laws and a political reform to streamline fragmented parties in a mercenary Congress, could remain elusive at a time of turmoil.
Many Brazilians are concerned that the end of Workers Party rule could bring back bad times for the poor, who have made great strides in the last decade.
"Has Dilma made mistakes? Of course. But the Workers Party has done so much for us, for the people," said Benedito Polongo, a 63-year-old janitor outside a shiny Brasilia business center, who said he had no job or bank account before the party came to power. "I fear that those who come after her will erase all that has been done for the poor."