In April, Brazil’s Chamber of Deputies voted to impeach President Dilma Rousseff (Workers’ Party, PT) halfway through her second term, by a final tally of 367 to 137. There’s more to this story than the final tally.

Media coverage has focused largely on the spectacle of the session, whether the process is legitimate, or how damaging this crisis has been for Brazil’s democracy. But how do state and local politics play into the president’s demise?

Rousseff’s main coalition partner, the PMDB, orchestrated and provided the bulk of the impeachment vote. But it was the defection of smaller parties that ultimately brought about her defeat. Three key parties accounted for 93 “yes” votes — while the “no” votes fell 26 shy of stopping the impeachment. These parties, generally hungry for resources, turned on the president despite being offered greater influence in the Cabinet in the days before the vote.

The impeachment vote breakdown, by state

Here’s where state politics get really interesting. Defector party votes varied significantly across state delegations. The “yes” vote carried in 22 of 27 states. Of the five states that voted against impeachment, four are governed by the PT, and the other by a leftist ally. In two PT-governed states (Bahia and Ceará), representatives from defector parties defied national party leaders and voted to keep the president. But in another (Minas Gerais) they voted heavily to impeach her.

Wendy Hunter, at the University of Texas at Austin, and I found that the PT leveraged the presidency to gain a critical foothold at the state and local levels in the less-developed Brazilian Northeast (where many of these states are located). Despite its control over federal resources, the PT could not breach local strongholds alone. Rather, it pragmatically made alliances with parties from the center and right that provided local voters — and in return expected government assistance, such as patronage appointments and discretionary resources available through federal ministries.

The vote breakdown reflects these local bases of political support. The state delegations that voted with the president stayed loyal at the behest of their governors and because these smaller parties had significantly more to lose than federal pork, i.e., privileged positions in state governments. Where these parties were not part of the state coalition (Minas Gerais), the governor could not effectively steer their votes.

State-level support is critical to today’s PT. Although it became famous for taking a different political approach, the party became increasingly normalized on its way to the presidency, making use of marketing-driven campaigns and embracing pragmatic coalitional politics. One such departure was picking Michel Temer as Rousseff’s running mate and ceding prominent Cabinet posts to the PMDB — the type of party they historically eschewed. But the PMDB, a loose confederation of local elites, proved a reliably unreliable partner. The PT government then hedged its bets by giving away a larger share of the Cabinet and the bureaucracy to smaller parties and openly steering PMDB and opposition politicians to join these parties.

Let’s look more closely at the charges

Jurists tied to the opposition accused Rousseff of using a series of accounting tricks, such as delaying payments to state-owned banks, to shield the size of the government deficit. This allowed the president to boost spending in key states in an election year.

During the actual impeachment vote, however, few representatives mentioned the formal charges. “Yes” voters made impassionate references to family, God, country, home constituencies and interest groups. “No” voters touted the PT’s social and economic record before shouting, “No to the coup!”

In practice, the impeachment vote was a political trial of a highly unpopular president. Six years ago, the PT had unparalleled popularity resulting from economic growth, stability and policy innovations that significantly cut into Brazil’s high levels of socioeconomic inequality. Since then, Brazil has experienced a historic economic downturn as the global commodity boom collapsed. A corruption scandal crippled the state oil giant, Petrobras, the political appointees who controlled it and its private contractors.

Rousseff isn’t the only politician caught up in accusations

Quite a few of Brazil’s entrenched political elites face serious ethical charges. The heads of both chambers of congress are involved in corruption investigations, and 60 percent of sitting lawmakers face legal challenges. Although high-ranking members of her party have been implicated in corruption investigations, the president actually has not. Yet, the scandals under her watch probably led to the upheaval in popular opinion against her.

These corruption charges, in turn, tie back into subnational interests in Brazil’s multiparty presidential system. Spanish political scientist Juan Linz argued that presidential systems are crisis-prone because they increase the stakes of political competition while guaranteeing fixed terms to independently elected executives and lawmakers. We can see Linz’s “dual democratic legitimacies” at work here. On one side, lawmakers respond to pressures from local elites and voters to chastise a president for propping up the economy in an election year by fudging government accounts. At the same time, the president touts her national electoral majority (54 million votes) to discredit her accusers and judges.

Brazil’s highly fractionalized multiparty system also helped corrupt practices flourish. Under these conditions, presidents have to portion out the Cabinet and the thousands of appointed positions they control in the bureaucracy in order to build legislative majorities. This “coalitional presidentialism” has been successful in Brazil and elsewhere, but the system is vulnerable to economic changes or shifts in public opinion.

Many of the parties that bulk up governing coalitions in Brazil are interested only in latching on to state resources. These parties, which the PT increasingly relied on, were also the least attached to its success. As opposition and pragmatic parties stepped up their attack, many (although, as we have seen, not in their entirety) easily realigned back to the right.

What’s ahead for Rousseff and the PT — and politics in Brazil in general? Brazil has made a considerable effort to clean up corruption in recent decades. Transparency legislation requires timely disclosure of the minutiae of public spending. Oversight bodies have increased capacity and mandates. And political parties are blocked from usurping new social policies for political gain.

An earlier post in the Monkey Cage argues that what is happening in Brazil is part of a regional resurgence of the political right across Latin America. Whether the right will displace the PT is difficult to predict. If it does, it probably will depend as much on politics in the states as on what happens in Brasília.

Jorge Antonio Alves is assistant professor of political science at Queens College at CUNY.