People protest in favor of Brazilian President Dilma Rousseff’s government in Largo de Batata, Sao Paulo, on March 24, 2016. The Chamber of Deputies is currently carrying out impeachment proceedings against Rousseff, and is determining whether there are sufficient grounds to have a full impeachment trial in the Senate. (EPA/Ricardo Nogueira)

What’s next for Dilma Rousseff? Brazilians don’t have a high regard for their current president: 67 percent disapprove of her administration and only 11 percent support her.

Pummeled by the country’s deepening economic recession and a nasty corruption scandal, Rousseff faces impeachment. On March 18, Brazil’s congress restarted impeachment procedures. On March 29, her most influential ally, the Brazilian Democratic Movement (PMDB), voted to abandon its coalition with Rousseff’s Workers’ Party (PT).

Despite these problems, Rousseff and her administration may yet survive impeachment. Here’s why. First, political scientists here in the Monkey Cage and elsewhere point out that the impeachment process has serious flaws. Second, Rousseff herself has yet to be implicated in the corruption scandal. Third, Brazil’s electoral rules create incentives for politicians to ignore party discipline and follow whoever offers the most for their vote. This means that when Brazil’s congress sits down to vote on Rousseff’s impeachment, politicians might side with Rousseff, not their own parties.

Here are four things to understand about what’s going on in Brazil.

How does the impeachment process work?

Last week, the Brazilian House of Deputies named a committee to investigate the impeachment case against Rousseff. Of the 65 members of this committee, 21 have active corruption cases against them; Rousseff, on the other hand, has not had any corruption cases opened against her. Instead, the impeachment case rests on the claim that Rousseff illegally postponed certain government payments in last year’s budget in order to circumvent a Brazilian law that requires budgets not to run deficits.

Here’s how Brazil’s impeachment process works. Congress will consider the impeachment charges, starting with a committee and then a full session of the lower house. If the lower house votes for impeachment and the Senate opts to receive the case, Rousseff will cede temporary control of the country to the vice president, Michel Temer, hardly a loyal Rousseff supporter. The Senate would then try the president and could impeach her with a two-thirds vote. Politicians, not impartial judges, are casting the crucial votes. And these politicians all have very particular motivations as a result of Brazil’s political system.

What’s so different about Brazil’s electoral process?

Brazil’s presidential system and odd mix of electoral rules tend to produce weak parties. Politicians from most parties in Brazil, including the PMDB, do not vote as a bloc and Brazil’s peculiar electoral system encourages this behavior.

Brazil elects presidents, governors, and mayors with a majority run-off system: candidates win with a majority, but if no candidate receives a majority, the top two advance to a second round to decide the winner. Senators gain a seat in the legislature with a simple winner-takes-all election, the same as the U.S. election process.

In the lower house, Brazil’s federal deputies compete in something altogether different: an open-list proportional representation system. Parties get seats in the lower house in proportion to the votes they receive. Unlike closed-list systems, the parties do not determine who sits where on the list. Instead, the candidates who receive the most votes within each party’s coalition win seats.

So what does this mean? Under these electoral rules, candidates help parties – but aren’t necessarily loyal. A party that dictates too much to its deputies pays the price. Deputies can quickly jump ship to a party more inclined to leave them be: At one point, more than  a third of all deputies would switch parties during a given legislative session. For voters, it’s more difficult to hold politicians accountable; it’s tough to monitor all the candidates in your district, and given that there can be thousands of candidates running in one state, it can be even tougher to coordinate efforts to defeat those you don’t like.

The runoffs in gubernatorial elections add to this lack of party organization. Parties even form alliances during presidential elections. André Borges and Ryan Lloyd, in a paper currently under review, found that this effect does not reduce the number of parties in Brazil because gubernatorial elections provide enough prizes for regional parties to survive without winning presidential elections. Borges also argues that these dissimilarities between presidential and gubernatorial coalitions lead to more parties running for legislature. As a result, Brazil currently has 25 parties in the lower house and 16 in the Senate.

How does this play out?

This fragmentation means that members of congress frequently defy their leaders, often going against party orders. Last week, for instance, PMDB deputy Mauro Lopes was sworn in as Rousseff’s new Minister of Civil Aviation, ignoring the PMDB’s directive forbidding members from taking ministry positions in Rousseff’s government. Several key PMDB members, such as the party leader in the lower house, are pro-Rousseff, and could be difficult to shift even with the party’s official break with the government; recently the PMDB minister of science and technology spoke out about his opposition to the impeachment process and reluctance to resign his position.

In addition, since Brazilian politicians finance their own campaigns, with minimal help from parties, they are always on the lookout for campaign funds. The current corruption scandal, in fact, involves allegations of illicit campaign contributions. Parties attract politicians in part by offering strategic positions that give politicians access to resources and allies. Scott Desposato found that competing offers and low costs to party switching drive Brazilian politicians to change parties frequently.

Will Dilma stay?

Pro-impeachment activists believe there are 259 votes in congress for impeachment — short of the 342 votes needed to push impeachment forward. Rousseff and her party will likely try to pluck off individual members of congress like Lopes with a variety of promises and incentives, including government appointments.

In fact, the ongoing corruption investigation could shift some votes to Rousseff. The opposition has successfully linked its campaign to impeach Rousseff to concerns about corruption, even though she has not been implicated in the scandal. Opposition and PMDB legislators, however, might begin to lose their appetite for fiery anti-corruption speeches as more evidence emerges linking those legislators themselves to potentially illegal campaign donations and bribes.

Even though public opinion appears dead-set against Rousseff, she may persevere. The nature of the Brazilian impeachment process and electoral system puts a large degree of power in the hands of self-interested, largely unbound political actors whose votes can change very quickly. While much of the opposition and many members of parties like the PMDB will certainly vote to impeach her, others will be a good degree more malleable. That might be enough to keep her in power.

Ryan Lloyd is a PhD candidate at the University of Texas-Austin and a junior collaborating researcher at the University of Brasília.

Calla Hummel is a PhD candidate in government and National Science Foundation fellow at the University of Texas-Austin.