PROTESTS have been something of a way of life in Peru for decades, the lasting product of a collapse in the economy and of trust in the political system in the 1980s. They have continued even as the economy has boomed, with annual average growth of 6.5% since 2003. But the country’s latest demonstrations have an air of modernity about them, a faint whiff of the discontents of an aspirational lower-middle class that have recently shaken Chile and Brazil.

The trigger was a decision by Congress to share out among party hacks important jobs at supposedly independent bodies, such as the ombudsman; six justices of the Constitutional Tribunal, the highest court; and three vacant slots on the Central Bank’s board (though in this case the nominees were unobjectionable). Outrage against what many Peruvians see as a corrupt and self-serving political class was swift, dominating both traditional and social media. When several thousand protesters gathered outside Congress on July 22nd, the legislators swiftly backed down, rescinding the appointments.

Other groups have more familiar grievances. Doctors and nurses are striking over pay. The unions are protesting against an important reform aimed at making the state more efficient by allowing idle or incompetent civil servants to be sacked.

All this comes as the president, Ollanta Humala, a former army officer, faces rising unpopularity and a slowing economy. His approval rating has fallen by 20 points since April, plumbing the mid-30s in opinion polls in early July. Mr Humala was elected as a leftist but has governed as a conservative. An almost reclusive leader of few evident convictions, he is both mistrustful and, after two years in office, increasingly mistrusted. Union leaders, who backed him in 2011, now consider him a traitor to their cause. Businessmen who warmed to his economic policies were disconcerted by an ill-advised—and quickly shelved—presidential suggestion that the government should buy a stake in the Peruvian assets of Repsol, a Spanish oil firm. Many Peruvians complain that Mr Humala has failed to tackle rising crime.

It does not help the president that the fall in mineral prices has slowed down the economy. Exports in the first five months of the year were 13% lower than in the same period in 2012. The economy is likely to grow by only around 5% this year.

That is still a handsome rate. Luis Miguel Castilla, the capable economy minister, points out that Peru remains an attractive destination for mining investment, with lower energy and labour costs than neighbouring Chile. He says that public-private infrastructure projects worth over $5 billion will be put out to tender this year. The financial system and the public finances are solid. But without reforms, such as the civil-service law, to create a more effective state, growth will slow, he admits.

Mr Humala is not yet as unpopular as his two predecessors became. Indeed, Steven Levitsky, a political scientist at Harvard University, points out in a column in La República, a Lima daily, that since 1997 no Peruvian president has managed to sustain an approval rating of over 50%. But he warns that Mr Humala has become politically more isolated than his two predecessors, with few firm allies outside the army. If that continues, it could eventually be dangerous for Peru’s democracy.