The polls have a silver living for Ms Rousseff and her Workers’ Party (PT). Despite her problems, most of her opponents have failed to make much progress. The protests were in part a cry of anger against the whole political class. Support for Aécio Neves, the likely candidate of the Party of Brazilian Social Democracy (PSDB), the main opposition, has only nudged up, according to Datafolha, another pollster (see chart). Mr Neves had two successful terms as governor of Minas Gerais, Brazil’s second-most-populous state. But since moving to the Senate in 2011, he has made little impact on the national scene.

Mr Neves has recently been preoccupied with internal wrangling. Party chiefs are attempting to anoint him as their candidate. But he faces a challenge from José Serra, the losing PSDB candidate in 2002 and 2010. Aged 71, Mr Serra’s ambition is undimmed, despite his party’s reluctance to back him. He wants a primary, on pain of a reported threat to switch to another party, which would weaken Mr Neves.

Another potential threat to the PSDB is an investigation into alleged corruption in the state government in São Paulo, which the party has run since 1995. Anti-trust regulators are probing claims that companies building and maintaining train and metro lines formed a cartel and defrauded the state of hundreds of millions of reais. Federal prosecutors have launched a parallel investigation to discover if state officials received kickbacks from the scheme. Any evidence of wrongdoing would complicate the efforts of Geraldo Alckmin, the increasingly unpopular governor, to hang on to the state next year, and might divert party efforts from the national campaign.

The other contender failing to take off is Eduardo Campos, the governor of Pernambuco. Mr Campos is formally an ally of Ms Rousseff’s but encouraged talk of a presidential bid. However, PT leaders have worked to deny his mid-sized Brazilian Socialist Party the allies it needs for a national campaign.

The main beneficiary of the protests is Marina Silva, a former PT minister and environmentalist. Ibope found that Ms Rousseff would beat her only narrowly in a run-off ballot. Ms Silva is setting up a new party called the Sustainability Network, which she presents as being outside traditional politics. But that in itself will limit her entitlement to free television and radio time in the campaign, since two-thirds of this is based on past election results.

Apart from a stagnant economy, the biggest threat to Ms Rousseff is that worried allies desert her ramshackle 17-party coalition. She has had to come up with scarce funds for several of their pet projects. The power of incumbency is now her main advantage. “The president’s task has become much more difficult since the protests, but she remains the favourite,” says Murillo de Aragão, a political analyst in Brasília. Ms Rousseff can be thankful her opponents’ difficulties seem even more daunting than her own.