VLADIMIR PUTIN is the world’s saviour. So says a weekly prime-time show on state television, “Moscow. Kremlin. Putin.” Its latest episode featured the Russian president heroically bringing peace to Syria over a lunch of lamb and raspberries with Turkey’s Recep Tayyip Erdogan; Mr Putin being mobbed by women at a forum in St Petersburg; Mr Putin hitting a distant target at a firing range with a new sniper rifle. The aim of the programme is to boost the president’s image. But as the past few weeks have shown, Mr Putin is starting to miss his mark.

The foreign adventures that have brought Russia’s new tsar a big boost over the past few years are starting to go wrong. The exposure of two military security agents named by the British police as the men who tried to murder Sergei Skripal and his daughter with a nerve agent have brought global embarrassment by revealing the remarkable incompetence of the security agencies. The affair is also soon expected to produce a new round of American sanctions.

Meanwhile, the wars in Ukraine and Syria are becoming more costly. On September 17th, as Israel bombed Syrian military installations, Syrian forces accidentally shot down a Russian spy plane with 15 crew on board. In response, the Kremlin lashed out at Israel and agreed to supply S-300 missile systems to Bashar al-Assad, despite protests from Israel, thereby risking further escalation. The war in Ukraine, meanwhile, has produced a religious split between Russian and Ukrainian churches, undermining Mr Putin’s claim to be the unifier of the Russian world.

But Mr Putin’s main problems lie at home. In the past few weeks the Kremlin has suffered the biggest electoral fiasco since large-scale protests broke out over election-rigging in 2011, losing four gubernatorial elections this month. The losses are all the more striking since the elections themselves were neutered. Any serious challenger was barred from standing, so the rivals to the Kremlin’s candidates were meant to be no-hopers.

Yet in an atmosphere of economic stagnation and building discontent, even these tame elections turned into a form of protest for voters who have traditionally supported Mr Putin—pensioners, low-paid workers and the young from provincial towns. Moscow, the scene of the largest protests in 2011, has been placated with money, renovation and social projects, but the resentment in the regions has grown.

The alarm bell rang first in the far east of the country, where an incumbent governor installed by Moscow was forced into a run-off. Mr Putin, who was in Vladivostok for an annual pow-wow with China, had personally endorsed him. “I know you have a second round ahead of you. I think everything will be all right,” Mr Putin told Andrei Tarasenko, the governor, in a televised meeting. It was not.

Emboldened, voters gleefully turned up for the run-off on September 16th in far greater numbers than they had done in the first round, to vote for the 37-year-old Communist challenger, Andrei Ishchenko. A last-minute attempt to rig the result was so clumsy that the government did not risk upholding it, but instead of awarding the prize to the rightful victor has called for a re-poll. On September 23rd three more governors backed by the Kremlin lost the second round of their elections, in each case on an increased turnout.

Don’t mess with the pensioners

The immediate cause for all this is a proposed hike in the age at which Russians can retire and claim a state pension. Mr Putin had previously vowed that this would never happen. And of course, the security services are exempt. Under the proposal, Russian men can expect to retire at 65 and die at 66; many will never receive a pension at all. Small wonder they are miffed.

In the past six months, Mr Putin’s approval rating has fallen by 15 percentage points. Only 48% of Russians trust the president or say they would vote for him today, even though he was re-elected in March with 76% of the vote. The rating of the Kremlin’s United Russia party is below 30%. Despite all the propaganda, people no longer see Mr Putin as their saviour, and blame him for spending too much time on making Russia great again rather than helping them get by.

Even the wealthy elite are feeling tetchy and uncomfortable, thanks both to the growing confrontation with the West (which threatens their fortunes) and the unchecked power of the FSB, the secret police (which threatens their liberty and even their lives). A few years ago, an endorsement from Mr Putin was seen as guaranteeing political victory. Today, standing close to Mr Putin carries a risk, both inside and outside the country.

None of this means that Mr Putin’s system is about to crumble. But he may try to mitigate its vulnerability with violence at home and abroad. Another sign of that came on September 24th, when Alexei Navalny, an opposition leader who had spent the previous 30 days in jail for organising a protest rally nine months ago, was re-arrested two minutes after being released. With the appetite for protest rising, he and his anti-corruption investigations are becoming a threat.

If that were not enough, Mr Putin’s security men have also been threatening extrajudicial acts. Viktor Zolotov, Mr Putin’s former bodyguard who now commands a 300,000-strong internal army designed to put down any sign of revolt, on September 11th bizarrely challenged Mr Navalny to a duel and promised to “make a juicy beefsteak” out of him. His threat testified only to the Kremlin’s growing fear of an open and honest contest.