IN A book of interviews published when he first became Russia’s president, Vladimir Putin told a story of his early scares: a rat he had cornered had nowhere to go and jumped out at him. Having pushed himself into a corner, Mr Putin is now playing out his childhood nightmare.

After several months of relative quiet in Ukraine and at home, he has raised the stakes. In Ukraine, he has shattered a fragile ceasefire, along with last September’s Minsk peace deal. The rebels are advancing and Mr Putin has called the Ukrainian Army a NATO foreign legion. At the same time, he is building up his defences at home by mobilising paramilitary brigades to fight potential Maidan-style protests. The latest violence in Ukraine is, in many ways, a sign of Mr Putin’s desperation.

Five months ago, Russian troops moved in to stop the Ukrainian army clearing out rebels in the Donbas region. Ukraine’s defeat soon become apparent. Its trade agreement with theEuropean Union was put on ice and the Ukrainian parliament passed a law granting broad autonomy to the parts of the Donbas controlled by the separatists. Talk of Ukraine joining NATO stopped. America was cut out of discussions between Russia, Ukraine and Europe. Mr Putin’s goal of creating a separatist zone within Ukraine seemed within reach.

Yet hybrid wars can breed hybrid results. Since Russia never admitted to its military involvement, it could not claim victory and impose its will by keeping soldiers on the ground. Once its troops withdrew from eastern Ukraine, Mr Putin’s victory started to look shaky. The rebels refused to lay down their arms, and Ukraine’s president, Petro Poroshenko, would not admit defeat. Ukraine has not, so far, recognised Donetsk and Luhansk or abandoned its NATO aspirations. Indeed, on December 29th Mr Poroshenko signed a law scrapping Ukraine’s neutral status.

The West has continued to press Mr Putin to stop supplying arms to the rebels before engaging in further talks about the make-up of Ukraine. In a sign of clear mistrust, European leaders called off a planned summit with Mr Putin in Astana. So Mr Putin decided to show his resolve. Russian-backed separatists relaunched their offensive on Donetsk airport, which had become a symbol of Ukrainian resistance. Alexander Zakharchenko, the rebels’ leader, also attacked the port of Mariupol. A missile barrage missed its target and instead hit a residential area, killing 30 civilians (see article). As soon as this became clear, Mr Zakharchenko was instructed by Moscow to change his story and blame the Ukrainians and their Western backers for provocation—a narrative swiftly backed up by Mr Putin.

Ukraine, Mr Putin declared, was in a state of civil war. But he added that the Ukrainian army was a “foreign NATO legion which doesn’t pursue the national interests of Ukraine but wants to restrain Russia.” This statement was carefully prepared by a Russian television display of mysterious English-speaking soldiers in Ukrainian uniform and footage of American military commanders in Kiev. “After each such visit by American military, the fighting in Ukraine starts anew,” the main news programme explained.

This ratcheting up of anti-Western rhetoric is in part a response to a deteriorating economy. Indeed, Mr Putin upgraded the war into a Russia-NATO conflict just as Standard & Poor’s, a rating agency, was downgrading Russia’s credit rating to junk. The fall in oil prices and continued pressure on the rouble is driving up prices, causing much grumbling among ordinary Russians. While the government is carefully avoiding the word crisis, it has started to talk of anti-crisis measures. So is the opposition. Alexei Navalny, an opposition leader, and Boris Nemtsov, a veteran liberal, have called for an anti-crisis rally. “Putin is crisis and war. No Putin—no crisis and no war,” wrote Mr Nemtsov.

Mr Putin has also planted new defences within Russia. On the day the rebels launched their attack on Donetsk airport, an “anti-Maidan” movement was launched, consisting of tough-looking Cossacks, Russian veterans of wars in Afghanistan and Chechnya, black-leather-clad bikers called night wolves and professional sportsmen trained to fight any sign of liberalism. (This is on top of several thousand Chechen fighters under Chechnya’s president Ramzan Kadyrov, who swear personal loyalty to Mr Putin.) The group, whose launch was advertised in the state media, seems to have a licence to carry out extra-judicial violence. Their first action was to attack supporters of Mr Navalny who had gathered in a Moscow café.

The annexation of Crimea and the war in Ukraine have thus helped Mr Putin to consolidate power at home. But as the economy deteriorates, he cannot afford to let go of eastern Ukraine and seems trapped by the logic of escalating conflict. As Carl Bildt, a former Swedish foreign minister and longtime Russia watcher, puts it, Mr Putin now has an explicitly revisionist agenda under which he is seeking to change the post-cold-war settlement of Europe through an information war and, if need be, by military force. An explicit threat of a bigger war in Ukraine has been aired by Sergei Markov, a Kremlin propagandist, who suggests that Russia needs to topple the government in Kiev and occupy Odessa and Kharkiv. Only then, he writes, “will sanctions be lifted, the junta driven out of power and Ukraine become democratic and federal—in exchange for not taking Kiev.”

This warmongering is clearly aimed at the West, which is considering new sanctions, including cutting Russia out of the SWIFT banking system, something that could have a devastating impact on the economy. Dmitry Medvedev, Mr Putin’s prime minister, has warned that this would trigger unrestricted retaliation—and not just economically. The danger is not that Russia declares war on NATO, but that its recklessness could have unintended consequences. There is also a risk that Ukraine, a country of 45m people with a will of its own, despite what Mr Putin thinks, could be provoked into full-scale war.

All this may make the situation in some ways even more perilous than in the cold war. Igor Ivanov, a former foreign minister, has even suggested, one hopes with some exaggeration: “In the absence of political dialogue, with mutual mistrust reaching historical highs, the probability of unintended accidents, including those involving nuclear weapons, is getting more and more real.”