As hundreds of thousands of Brazilians flooded the streets on Sunday in the biggest ever protests calling for the ousting of President Dilma Rousseff, it’s hard to recall that Brazil was the darling of the emerging countries only a few years ago. The second largest economy among the BRICS and the peaceful home of football, Bossa Nova and Carmen Miranda, Brazil bounced back splendidly after the Great Recession. GDP growth rates had been rising throughout the 2000s and, after a brief contraction, the economy expanded by a record 7.5% in 2010, pushed by bold anti-cyclical policies.

Today, former president Luiz Inácio Lula da Silva, from the Workers’ Party (PT), who was fêted around the world, finds himself under threat of imprisonment. Meanwhile, his handpicked successor, Rousseff, elected in 2010 and re-elected four years later, is terminally isolated. Her popularity is stuck in single digits, and she has failed to avert the disintegration of her administration. Rousseff is also being challenged by impeachment proceedings in Congress, and by a simultaneous case against her campaign finance on the Supreme Electoral Court, which might remove her as well as Vice-President Michel Temer, from the centrist PMDB.

The PT is hemorraging members and no longer functions as a political party. Congress is grinding to a halt, and the Judiciary and civil society are tearing themselves apart over the gigantic Lava Jato (Carwash) corruption scandal, that has been gathering speed for two years. In the meantime, the economy has fallen off a cliff. GDP contracted by 3.8% in 2015, and may decline by a further 3% this year. This worst depression since records began is accompanied by the most severe political crisis since the overthrow of left-wing President João Goulart, in 1964.

In the home of telenovelas, the drama is both bawdy and sprawling. Most political leaders and every major party are tainted: the Speaker of the Chamber of Deputies, Eduardo Cunha (PMDB) is comically leading Rousseff’s impeachment while defending himself against charges of corruption both in Brazil and in Switzerland. The Speaker of the Senate is accused of multiple irregularities, and the leaders of the main opposition party, PSDB, are embroiled by accusations ranging from billionaire robbery to the provision of public sector jobs to their lovers. Dozens of illegal bank accounts and several illegitimate children have come to light.

Those revelations are nauseatingly entertaining; they are also substantive at three levels. First, they illustrate the operational autonomy of the Brazilian Judiciary and the Federal Police. These agencies have almost unlimited power to investigate, arrest, negotiate plea bargains and tactically imprison anyone who may be able to reveal additional names, whose prosecution fuels the subsequent stage (currently the 24th) of the Lava Jato operation. Dozens of high-flying politicians and some of Brazil’s most prominent businessmen have become ensnared. Second, the investigation is both ruthless and blatantly biased against the PT. Funding trails leading elsewhere are quietly parked, while immodestly telegenic public prosecutors, dashing Feds and loud TV anchors plead for the removal of President Rousseff and the destruction of the PT, as if the party had the monopoly of graft. The tightening vice is likely to destroy Rousseff’s administration, Lula’s political inheritance, and one of the world’s largest left-wing political parties.

It did not have to end like this. Lula was elected President in 2002, inaugurating a succession of administrations that tended to follow the path of least resistance: they made no attempt to reform the state or the political system, challenge the ideological hegemony of neoliberalism, reform the media or transform the country’s economic structure. Instead, the PT maintained the neoliberal macroeconomic policy framework imposed by the preceding PSDB administration while, simultaneously, using the resources made available by the global commodity boom to support its emblematic distributive programmes: Bolsa Família, university admissions quotas, the formalisation of the labour market, mass connections to the electricity grid and rising minimum wages. The PT’s unwieldy political alliances locked in this ‘reformism lite,’ that gradually alienated the party’s working class base. The government’s multiple limitations also fuelled a hardcore neoliberal opposition populated by the country’s hard-pressed upper middle class and cemented ideologically by a choleric media. Instead of disarming these political traps, Lula and Dilma Rousseff let themselves become entangled with unreliable allies that, eventually, betrayed them.

The third reason why the Brazilian corruption drama is significant is that it repeats a pattern. Historically, allegations of corruption have provided the most reliable bond between a conservative and exclusionary elite and a relatively large middle-class, against left-leaning governments. Those familiar with Brazilian political history will recall the years 1945, 1954, 1964 and, not least, 2005, when Lula was nearly impeached because of the grotesque Mensalão scandal, which turned out to be the dress rehearsal for Dilma’s unfolding tragedy.

There is no question that corruption must be punished. However, corruption in Brazil cannot be eliminated one scandal at a time. Corruption belongs to the machinery of the state; it has linked politics with business life for 500 years, and it buttresses the country’s inequality-generating social structures. Addressing this scourge requires more than the arrest of Lula or the overthrow of Dilma Rousseff. It requires a new structure of the state, supported by a social consensus around transparency, accountability and ethical principles in public administration, backed up by democratic modalities of party political funding. Anything less is a politically-driven diversion.

Alfredo Saad Filho is a professor of economics at SOAS, University of London.