Brazil has rarely had it so bad. The country’s economy has col­lapsed: since 2013, its unemployment rate has nearly doubled, to more than 11 percent, and last year its GDP shrank by 3.8 per­cent, the largest contraction in a quarter century. Petrobras, Brazil’s semipublic oil giant, has lost around 85 percent of its value since 2008, thanks to declining commodity prices and its role in a massive corruption scandal. The Zika virus has infected thousands of Brazilians, exposing the frailty of the country’s health system. And despite the billions of dollars Brasília poured into the 2014 World Cup and this year’s Olympic Games, those events have done little to improve the national mood or upgrade the country’s urban infrastructure. Meanwhile, many of Brazil’s long-standing problems have proved stubbornly persistent: half of all Brazilians still lack access to basic sanitation, 35 million of them lack access to clean water, and in 2014, the country suffered nearly 60,000 homicides.

But Brazil’s biggest problems today are political. Things first came to a boil in the summer of 2013, when the police clashed with students protesting bus and subway fare hikes in São Paulo. Within days, some 1.5 million people took to the streets of Brazil’s big cities to protest a wider set of problems, including the government’s wasteful spending (to the tune of some $3.6 billion) on the construction and refurbishment of a dozen stadiums for the World Cup. In the months that followed, when Brazilian President Dilma Rousseff appeared on television to soothe the unrest, Brazilians across the country drowned out her voice by rattling pots and pans from their balconies. In October 2014, after promising to increase public spending and bring down unemployment, Rousseff managed to win reelection by a thin margin. But she quickly backtracked on her major pledges, announcing a plan to cut state spend­ing and rein in inflation. The public’s anger mounted.

The chaos roiling Brazil is the product of flawed political engineering.

The deathblow to Rousseff’s government came from another source, however: a corruption investigation that had been brewing even as she campaigned for reelection. In March 2014, Brazilian prosecutors exposed a scheme under which business leaders and government officials had been colluding to generate kickbacks worth some $2 billion since 2004—one of the largest corruption scandals in history. Operation Car Wash, as the investigation has come to be known, found that private companies had been sending politicians cash through intermediaries at Petrobras in exchange for juicy contracts with the oil giant, the board of which Rousseff had led before becoming president. As new revelations involving high-ranking officials hit the Brazilian media over the course of 2015, Rousseff’s reputation suffered irreparable damage; in August of that year, her approval rating sank to eight percent—a historic low. Even Luiz Inácio Lula da Silva (known as Lula), Rousseff’s once wildly popular predecessor, was drawn into the vortex: in March 2016, prosecutors began investigating his ownership of an undeclared property in the beachside city of Guarujá that had been renovated by a construction firm implicated in the Petrobras scheme, among other possible offenses.

In May, as the congressional coalition led by Rousseff’s Workers’ Party crumbled, legislators voted to suspend her from office and began impeachment proceedings on the charge that she had manip­ulated the budget to hide a gaping deficit. (No one has suggested that she personally profited from the graft at Petrobras.) Her vice president, Michel Temer—a savvy operator who cut his teeth in the Chamber of Deputies (the lower house of the National Congress, Brazil’s legislature)—took over as acting president, despite the fact that he, too, was the target of an investigation. Just a week before Temer stepped in on May 12, Eduardo Cunha, a lawmaker in Temer’s Brazilian Democratic Movement Party (PMDB), was removed from his duties as the Speaker of the Chamber of Deputies on charges of obstructing justice, lying to prosecutors, and hiding millions of dollars in a Swiss bank account. (Cunha formally resigned from the speakership in early July but kept his seat in Congress.) Temer soon lost three members of his cabinet to Operation Car Wash; in the coming months, as the judiciary’s investigation of PMDP operatives moves forward, he might end up facing charges himself.

All these revelations seem to suggest that Brazil’s current crisis is the product of widespread criminal behavior by its leading politicians. But the real source of the trouble goes deeper. The chaos roiling the country is the product not of individual malfeasance but of flawed political engineering. At the heart of Brazil’s problems with corruption and inefficiency lie the rules that govern the relationship between the country’s executive and legislative branches, which encourage exactly the kind of graft that the Petrobras scandal has revealed. To return their country to political solvency, Brazilians must take on a mighty task: they must make sweeping electoral and political reforms to eliminate the incentives that lead so many officials to break the law in the first place.

Dilma Rousseff and Michel Temer in Brasília, January 2015. Ricardo Moraes / REUTERS

A GREASY WHEEL

In many presidential systems, including the United States’, clashes between the chief executive and the legislature are common. Brazil’s 1988 constitution addresses that problem by granting the president extraordinary powers to break gridlock. Brazilian presidents can issue provisional legislation by decree (although all laws must eventually be approved by Congress), dislodge pending legislation from congres­sional committees, force Congress to vote on urgent measures, and veto bills in part or in whole. Those powers have long helped Brazil’s presidents avoid deadlock and pass many needed reforms.

It would be a mistake, however, to assume that Brazilian presidents are all-powerful. To the contrary: their ability to avoid gridlock comes at a high price.

Because Brazil’s Congress has more than two dozen political parties, it’s nearly impossible for a single one to win a majority. That forces Brazil’s presidents to form coalitions in order to govern effectively. And that’s where the problems start. Brazil’s political parties lack coherent ideological agendas; instead, they are loosely knit alliances whose members have no qualms about forming or dissolving coalitions at any time. As a result, members of Congress constantly renegotiate their political loyalties, based largely on the parochial interests of the con­stituencies they represent.

Making matters worse, Brazil’s electoral rules allow candidates to switch parties relatively easily, undermining any chance of ideological unity within coalitions. And candidates are elected to Congress based not on the number of votes they receive individually but on the total number their party pulls in. That creates an incentive for politicians to change allegiances on a regular basis: jumping ship for a party led by a popular candidate can often boost less popular aspirants to office (or keep them there). Brazilian politicians thus tend to ride on the coattails of powerful allies instead of focusing on party loyalty, ideological consistency, or the details of policy. All of that makes it hard for most voters to know what ideas individual candidates—or parties—stand for. As a result, Brazilians tend to pick their leaders based on their personal appeal rather than the quality of their platforms.

Brazil’s inefficiencies stem directly from its dysfunctional political process.

These problems are all intensified by the fact that once Brazilian lawmakers take office, few rules enforce loyalty. Not only can they switch parties; legislators can also vote as they wish, even if it means voting against their own party or the presidential administration their party ostensibly supports. Few pay a price for breaking ranks in this fashion. Members of Congress seldom get booted out of their party—and parties seldom get kicked out of their coalition—for disobeying party whips. Since those whips can’t control their own members of Congress, presidents must bargain with lawmakers on an individual basis in order to pass legislation. The need to win over so many individual allies—who all have their own interests and constituencies to please—has led Brazilian presidents to pump vast amounts of pork, patronage, and protection into the system. This year, for example, the federal government granted tax subsidies to well-connected families in the state of Goiás to help them pay to hire local musicians to play at their relatives’ weddings. And in recent years, the Brazilian press has reported on the construction of several roads and bridges that seem to lead to nowhere.

In many democracies, of course, logrolling is neither rare nor necessarily bad. But in Brazil, the practice has proved deeply counter­productive. For one thing, it has led to inefficient government spending. In 2015, tax revenues accounted for some 35 percent of GDP—more than they do in a number of wealthier nations, including South Korea and Switzerland. Yet despite this income, the country’s public goods are in dire shape. Take education: in an assessment of 65 countries completed by the Organization for Economic Coop­eration and Development in 2012 (the most recent year for which such data are available), Brazilian high school students ranked near the bottom in mathematics and reading—below their peers in Kazakhstan and Thailand. Or consider infrastructure: since spending money on expensive public goods doesn’t bring in many votes, the Brazilian government tends to favor investing in cheap roads designed for private cars rather than costly public transportation systems. As a result, Rio de Janeiro, a metropolis of 12 million people, has fewer miles of subway track than Lisbon, which is home to just 530,000.

Such inefficiencies stem directly from Brazil’s dysfunctional political process. Legislators and the president alike regularly raise taxes not so they can invest in better public services but so they can replenish the war chests they use to please the special interest groups that help them stay in power. With government spending benefiting thin slices of the electorate rather than the majority of Brazilians, the discrepancy between revenue and the quality and extent of public services is enormous. To be sure, many governments experience tugs of war between narrow interests and the public good, but the extent to which the electoral rules in Brazil favor the former over the latter has made the situation there particularly egregious.

And yet, bad as they are, these inefficiencies pale in comparison to the other big problem engendered by Brazil’s flawed political rules: endemic corruption. In many cases, the pork and patronage doled out by presidents prove insufficient to win Congress’ support; presidents therefore often sweeten the pot by allowing legislators to appoint their allies to plum jobs in Brazil’s powerful state-owned companies and regulatory agencies. Once in these posts, the new officials gain a say over which companies will receive lucrative government contracts. And many of them have proved all too happy to make those decisions based on bribes, which they then share with their patrons in Congress.

Operation Car Wash has exposed just how widespread this kind of corruption has become. According to prosecutors, numerous Petrobras executives were political cronies who saw their main job as charging illegal fees on deals with private-sector contractors—and then channeling those fees to their backers in government (after pocketing a portion for themselves). As for the contractors in question, they included many of Brazil’s mightiest corporations, including the construction giant Odebrecht and the multinational conglomerate Andrade Gutierrez. Estimates released by the attorney general’s office suggest that since 1997, the companies involved in the graft secured some $20 billion in subsidized credit from the Brazilian Development Bank, which is underwritten by taxpayers. To ensure continued access to this gold mine, the companies lavished gifts and other favors on cooperative politicians and contributed large sums, both on and off the books, to their reelection campaigns. Corruption was the rule, and Congress had strong incentives to ensure that public spending remained high and poorly regulated.

Game over: Dilma Rousse after being suspended by the Senate, Brasília, June 2016. UESLEI MARCELINO / REUTERS

THE BETTER OLD DAYS

The state of Brazilian politics has not always seemed so bleak. From 1995 to 2010, two social democratic presidents, Fernando Henrique Cardoso and Lula, managed to cut inflation, grow the economy, and lift millions of people out of poverty. But even though both leaders brought about a good deal of reform, neither set out to transform Brazilian politics. Rather than tackle the system’s structural problems, Cardoso and Lula cleverly worked around them, enacting policies that benefited most Brazilians while allowing the wheels of the patronage system to turn undisturbed. For a time, this tactic worked well, since both Cardoso and Lula were careful to insulate their pet economic and social policies from pressure from interest groups and their representatives in Congress.

In order to deal with Brazil’s corrupt and inefficient public health-care system, for example, Cardoso expanded the parallel Family Health Strategy, sending doctors into poor neighborhoods to provide preventive care and reduce the pressure on Brazil’s public hospitals. For his part, Lula launched Bolsa Família, a conditional cash-transfer program that cut poverty in Brazil by 28 percent and cost a mere 0.8 percent of the country’s GDP. The program was so cheap, and its benefits so obvious, that it eventually won widespread public support—even from Brazil’s conservatives, who initially opposed it. Both Cardoso and Lula also protected Brazil’s Central Bank and Finance Ministry from political pressure, giving them a free hand to pursue policies that helped the economy stabilize and then grow.

Cardoso and Lula weathered their fair share of corruption scandals, but their public-oriented policies and the strong economic growth the country enjoyed during their tenures convinced voters to look the other way. At their peak, these presidents were popular enough that lawmakers found it hard to openly oppose them or to extract fat concessions from them in exchange for their support. But Lula and Cardoso also benefited from the fact that when they entered office, Brazil was, by many measures, in far worse shape than it is today. That meant there was a lot of low-hanging fruit to be picked, and both leaders could bring about major improvements by making relatively small changes to the existing system. As things improved and Brazilians became more demanding of their politicians, new gains proved harder and harder to engineer—as Rousseff learned the hard way when she became president in 2011.

Brazil's politicians must seize the opening these cascading crises have afforded them.

Having never held elected office before, Rousseff had a difficult time navigating the give-and-take of Brazilian coalition building. She also had to weather the difficult aftermath of the global financial crisis and preside over an economy that was shrinking, due in part to falling commodity prices. Wedded to mercantilist and interventionist economic theories, Rousseff tried to stimulate Brazil’s sagging economy by increasing public spending. But this turned out to be a bad bet, since the flood of cash encouraged members of Congress to chase more pork and kickbacks. The combustible mix of rising unemployment, public frustration, and growing scandal that resulted would eventually seal her fate.

DON’T HATE THE PLAYER . . .

Unlikely as it may seem, Brazil’s current troubles might just have a silver lining: business as usual has become so costly that many Brazilians have finally accepted that the system has to change. Operation Car Wash has laid bare the misdeeds of the country’s political class, and for the first time, dozens of politicians and business leaders have gone to jail. In the past, officials were able to shrug off corruption investigations by relying on a lenient justice system, a weak congressional ethics committee, and a public that seemed inured to graft. That is no longer possible. The judges, investigators, and prosecutors running Operation Car Wash represent a new generation of civil servants, with new values, and they are using a new set of rules and tactics, including the threat of serious sentences and the carrot of leniency deals, to break the silence that politicians and businesspeople have maintained for decades. Just as important, according to public opinion research by the polling group Datafolha, most Brazilians now believe that corruption is their country’s biggest problem. And whereas the protests in 2013 were mostly about irrational government spending, more recently, Brazilians have taken to the streets specifically to protest official corruption.

For all his shortcomings, Temer seems to understand the need for change. He is pushing for Brazil’s first-ever cap on public spending, a measure that would limit government expenditures to current levels for the next 20 years, thereby forcing interest groups to compete for a fixed amount of resources instead of pushing for tax hikes or bigger deficits. He has introduced measures that will allow the government to reward efficient bureaucrats across the vast expanse of the Brazilian state. And crucially, he has raised the possibility of constitutional reforms that would reduce the number of political parties and restrict their ability to merge their electoral lists. Both measures would make it easier to get things done in Congress without graft.

An antigovernment demonstration in Sao Jose dos Campos, March 2016. Roosevelt Cassi / REUTERS

Getting Brazil back on track, however, will take even more sweeping reforms. In short, lawmakers must rewrite the rules of the game so that elected officials stop working only for their backers and start focusing on good governance for the majority of the population. Academics, policymakers, and pundits have offered a number of ideas for how they might do so. One radical proposal would have Brazil drop its presidential system in favor of a parliamentary one akin to the United Kingdom’s. By fusing Congress and the executive, that change would make legislators directly responsible for the success or failure of the government, and since lawmakers would be threatened with fresh elections if they challenged the government’s major decisions, such a reform might reduce corrupt dealmaking and encourage the development of stronger political parties. Other experts have argued for a semi-presidential system, in which a prime minister accountable to the legislature conducts day-to-day politics and a president retains the power to dissolve parliament and call new elections. Shifting to such a system could make lawmakers more accountable for the results of policy decisions while preserving the president’s status as a national figurehead. Yet another proposal would keep Brazil’s current presidential system intact but reduce the number of existing parties to between six and eight and push them to commit to coherent policy platforms, in part by abandoning the open-list proportional representation that defines today’s electoral system.

It is too early to say which of these proposals would be most effective. What is certain, however, is that Brazil’s political system will remain dysfunctional until the country’s president and legislators can work together effectively—in the name of party platforms, not clientelistic bargains. To get there, Brazil must reduce the number of parties in Congress and empower them to discipline their own members. Operation Car Wash, Rousseff’s impeachment, and the overall economic decline have created an opportunity for Brazil to pursue just this kind of reform. Now the country’s politicians must seize the rare opening these cascading crises have afforded them.