ON A bright and breezy morning in Brasília on May 12th, hours after the Senate had voted to start her impeachment for budgetary misdemeanours and thus suspend her as president, Dilma Rousseff walked down the front ramp of the Planalto palace to address a few hundred supporters of the Workers’ Party (PT). As she vowed defiance, behind her left shoulder stood Luiz Inácio Lula da Silva, her predecessor as president and the PT’s founding leader. He looked downcast and pensive, several times wiping his brow and his eyes with a handkerchief. No doubt he was contemplating the probable end of more than 13 years of PT rule.

Behind Ms Rousseff’s impeachment lies a double political failure. The PT once claimed a monopoly on ethical politics; in the public mind, it is now identified with leading a scheme to loot Petrobras, the state-controlled oil company, of more than $2.4 billion to fill its own campaign coffers and the back pockets of allies. And Ms Rousseff, whom Lula sold to the country as a top-notch manager, proved to be an incompetent steward of the economy.

So what went wrong for Latin America’s biggest left-wing party? The answer starts with the PT’s ideological ambiguity. Formed in 1980 by dissident trade unionists (such as Lula), radical priests, grassroots social movements and Marxist intellectuals, the PT claimed to be a new kind of party, of radical democracy and the dispossessed.

Instead of evolving towards European-style social democracy, it remained trapped in the politics of the cold war. According to José de Souza Martins, a sociologist at the University of São Paulo (and a man of the left), the PT adopted “a fatal Manichean political pedagogy which, ideologically, divided Brazil into two big antagonistic and irreconcilable countries”. It stood for “the people” and “the poor”; those who opposed it were defined as the “rich”, even as Lula embraced Brazil’s corporate state of vested interests and national business champions (against which he had once rebelled). Instead of building a consensus for progressive reforms of public spending and of the political system, Lula allied himself with conservative rent-a-parties and, eventually, the pork-barrel barons of the Party of the Brazilian Democratic Movement (PMDB). The PT’s drive to remain in power indefinitely led to the Petrobras corruption scheme.

This polarising politics worked while the economy boomed, when there was enough money to shower subsidies on corporate Brazil as well as on social programmes. It rebounded against the PT when things fell apart under Ms Rousseff. When millions took to the streets in 2013 to demand better public services and cleaner politics, the party and the government were unable to respond.

Now the PT finds itself out in the cold. Its social movements will be deprived of state funds, its militants of cushy public jobs. Its brand has been badly damaged. It faces a clobbering in municipal elections in October: already it has lost 130 of its mayors to defections.