As the impeachment trial of President Dilma Rousseff ground into its fifth day Tuesday, exhausted lawmakers listened as a prosecutor described the process as a “constitutional remedy” for Brazil’s political crisis.

But rather than strengthening Brazil’s 31-year-old democracy, the impeachment process may serve only to further alienate voters disillusioned with the political system.

Rousseff is widely expected to be removed from office Wednesday. She was suspended in May to face a Senate trial for allegedly contravening budget laws — specifically, using government banks to temporarily fund social programs and issuing spending decrees without congressional approval. She denies the accusations.

If at least 54 of the 81 senators rule against Rousseff, Michel Temer, her vice president-turned-political opponent, would be sworn in. That would end 13 years of rule by Rousseff’s leftist Workers’ Party, which has dominated a series of coalition governments.

The impeachment process has left Brazilian leftists in disarray. At a protest outside the Senate in Brasilia on Monday evening, just 300 people milled about, several slumped on benches, while members of the Workers’ Party gave impassioned speeches in Rousseff’s defense.

After narrowly winning reelection in 2014, Rousseff was dragged down by an economic recession and an enormous corruption scandal at the state-run oil company Petrobras. Since taking over as interim president in May, Temer has proved just as unpopular.

Analysts say the Rousseff case has exposed some of the weaknesses in Brazil’s political system, in which a president has to make deals with numerous political parties, many with little discernible ideology. That system encourages horse-trading and corruption, they say. Rousseff is not accused of benefiting from corruption, but dozens of politicians from her party and others in her governing coalition are under investigation in the Petrobras case.

“The fundamental issue for the Brazilian people is the lack of faith in the parties, due both to corruption and to the excessive number of parties,” said Saulo Porto, director of Prospectiva, a Brasilia-based strategic consulting firm.

Brazil allows small parties to hold seats in the legislature, and its proportional representation system encourages their proliferation, said Leon Barbosa, an adjunct professor of political science at the Federal University of Campina Grande.

“In the United States, the executive is one party,” Barbosa said. “In Brazil, there are many parties. Nobody can govern with their own party, they have to look for allies. This has a very high political cost.”

Many observers think Rousseff is not being punished so much for accounting mistakes as for losing the support of her coalition partners. On Monday, she defended herself point by technical point, but made little impact on senators who have said they will vote for her ouster.

“If Dilma is removed, it won’t be because of what she’s being tried for,” said Sen. Otto Alencar, who is voting against her impeachment.

Alencar said Rousseff was impeached because she had been unable to maintain the unwieldy coalition she formed after narrowly winning reelection. His Brazilian Social Democratic Party was part of that coalition but later split with it.

“She isolated herself from the National Congress,” he said. “There is no criminal act here.”

Even more disastrous was Rousseff’s earlier fallout with Temer’s party, the Brazilian Democratic Movement Party, which has participated in almost every government since democracy was restored in Brazil in 1985 after two decades of military dictatorship.

Lawmakers from many of these former allied parties voted overwhelmingly for Rousseff’s ouster during a stormy lower house session in May that laid the groundwork for the current impeachment trial.

Running Brazil requires deft negotiating and political skills, neither of which are Rousseff’s strong points. She was famed for screaming at ministers and underlings who did not meet her expectations, and she barely disguised her contempt for some pro-impeachment senators during Monday’s questioning.

If Rousseff loses, she will appeal to the Supreme Court, Gabriel Sampaio, one of her attorneys, said Tuesday. But if her removal stands, she will be barred from running for office for at least eight years.

A power gap is opening up Brazilian politics — one that smaller left-wing parties and evangelical Christian candidates are keen to fill. Early polls for October’s mayoral elections in Sao Paulo and Rio de Janeiro showed evangelical candidates leading — and the Workers’ Party mayor of Sao Paulo trailing badly.

“No one is grabbing my attention as someone who could really fix things after 2018,” the end of the current presidential term, Alencar said. “Someone may arise from outside of professional politics.”

In Sao Paulo, police used percussion grenades and tear gas on a march by anti-impeachment protesters on the main Paulista Avenue on Monday evening. In Rio, just a few thousand had turned out for a similar rally — compared to tens of thousands at similar events a few months ago.

“For the next year, we will suffer bitterly the fruits of this coup,” said Viviane Moreira, 31, an engineer who was among the protesters in Rio, referring to Rousseff’s impeachment. “We are very disoriented.”

Phillips reported from Rio de Janeiro.