A recent book, entitled The Sleepwalkers, describes how in 1914 Europe launched itself into four years of slaughter. The book paints a depressing picture of mutually mistrustful governments serially misreading each others' intentions, and blundering into a war which nobody wanted.

We are not playing for the same stakes in Ukraine, but the picture is depressingly familiar. In particular, we in the West need to understand where Russia is coming from if we are to find a way out of this crisis. Contrary to much overexcited comment, we are not dealing with a revived and aggressive Russian bear, but with an animal which sees itself as wounded and on the defensive.

In Russia's narrative, the West has been engaged in a campaign of encirclement and humiliation since communism fell in 1991. Twelve formerly communist states are now members of a hostile Nato. States friendly to Russia – Serbia, Iraq, Syria – have successively found themselves in Western crosshairs, and the first of these has been dismembered by Western military action. Russian-speaking populations in Latvia and Estonia are denied their civic rights while the West remains mute. When US-backed Georgia launched a war in 2008 it was Russia that found itself blamed.

Download the new Independent Premium app Sharing the full story, not just the headlines

When this rising tide threatened to engulf Ukraine – a country which Russia regards almost as an extension of itself, the "Little Russia" of the Tsarist Empire, source of the Orthodox faith, Scotland (if you like) to Russia's England – Vladimir Putin finally decided to call a halt. Crimea was seized in panicky anticipation of Nato taking it over. And Russia is now backing the rebels of east Ukraine as a way of enforcing two key demands – no Nato membership for Ukraine and proper protections for the Russian speaking population.

Against that background, the sanctions packages adopted by the West last week seem almost calculated to make things worse. For Putin, Ukraine is an issue not of economics but of national security. If the West can absorb Ukraine what comes next – Chechnya, Kaliningrad? To the Kremlin mindset, weakness in the face of such pressure simply invites more. Certainly, there will be economic pain, but a country which survived the total collapse of the 1990s can take it. And, as leading Russian opposition figures have pointed out, sanctions will only boost Putin's already stratospheric standing as his people's defender against a predatory West. Meanwhile, the Chinese will welcome with open arms Russian companies moving their funds from London to Hong Kong, and their drilling equipment purchases from Aberdeen to Shanghai.

As in 1914, domestic preoccupations have trumped international clear-headedness. Western politicians had to be seen to "do something" in response to the destruction of Flight MH17 with a missile probably supplied by Russia. But Barack Obama is largely driven by the need to appease a Congress which views him as weak, and has acknowledged that sanctions are unlikely to have much effect. And the EU has been engaged in its normal solipsistic game of negotiating a joint policy to demonstrate its "credibility", only as an afterthought asking itself whether the policy is a good one. Europe is now in the ludicrous position of withholding bank loans to Russia while selling her warships.

There is also a depressing British angle. The key EU sanctions are in the financial and oil industry sectors, suggesting that the UK will pay the most. But as the costs to us go up the likelihood that the Russians will listen to us goes down. David Cameron is plainly setting himself up as cheerleader for the "we must stop the bear" tendency. Some of this is sensible – such as his plans to focus the coming Nato summit on measures to reassure nervous allies. But his comparison last week of Putin's tactics with those of the Nazis pointlessly (and inaccurately) pricked the bear in its least forgiving spot.

Meanwhile, back in the real world the war continues, and the Russian-backed rebels are losing. They have abandoned a number of key cities and are in danger of losing access to the Russian border – their main channel for recruits and arms. This may sound welcome news but it is pushing Russia towards a dangerous decision point. If the rebels are defeated, the Kremlin will lose one of its key holds on Ukraine, and Putin's standing will be shaken. He will not readily let this happen.

The Russians have accordingly stepped up their supply of heavy weapons, including tanks and missiles. They may also have started engaging directly in the fighting from their side of the border and are again massing troops there. Russia does not want to invade east Ukraine, it has already pulled back from doing so once. The Russians know it would be unpopular, expensive, and hugely damaging to relations with the West. But they are gradually being dragged towards doing so.

We have every interest in preventing this. An invasion would reduce our relations with Russia to absolute zero. There would be more sanctions, which would be just as counter-productive as the current lot. Meanwhile, any prospect of Russian cooperation on current international business – from Iran to climate change – would vanish; and so, probably for decades, would any prospect of Russia evolving towards becoming a more normal European state. And all of this leaves to one side the remote, but not totally dismissable, danger of the West itself being pulled into military involvement in Ukraine.

This means that Angela Merkel, the one Western leader who has taken a relatively rational approach to this crisis, and the only one to whom Putin listens, needs to get back on the phone to him. After taking the inevitable tirade on the subject of sanctions, she needs to resume her pressure for an internationally observed ceasefire and talks on an agreed way forward for Ukraine. Even though the Russian bottom line looks manageable, and a generous aid offer to Ukrainian President Petro Poroshenko should help get him on board, it won't be easy, and it may well not work. But the alternative is a truly destructive downward spiral in Russia's relations with the West. More communication and less belligerence in 1914 could have spared us a catastrophe. There is a lesson there for today.

Tony Brenton is a former British ambassador to Moscow