Will history tell us we were fools? We worried about the wrong war and made the wrong enemies. In the first decade of the 21st century the leaders of America and Britain allowed themselves to be distracted by a few Islamist bombers and took easy refuge in the politics of fear. They concocted a "war on terror" and went off to fight little nations that offered quick wins.

Meanwhile these leaders neglected the great strategic challenge of the aftermath of cold war: the fate of Russia and its mighty arsenals, its soul tormented by military and political collapse, its pride undimmed. They danced on Moscow's grave and hurled abuse at its shortcomings. They drove its leaders to assert a new energy-based hegemony and find new allies to the south and east. The result was a new arms race and, after a Kremlin coup, a new war. Is that the path we are treading?

When Keynes returned from Versailles in 1919 he wrote an attack on the treaty that ended the first world war. In The Economic Consequences of the Peace he warned that punishing Germany and demanding crippling reparations would jeopardise Europe's stability and the building of German democracy. He confronted politicians, on both sides of the Atlantic, puffed up with the vanity of victory and convinced that the German menace had been laid to rest. He was right and they were wrong.

For the past six years Washington's whirling dervishes have reduced Anglo-American foreign policy to a frenzy of bullying hatred of anyone to whom they take a dislike. One half of this neoconservative agenda is heading for the rocks, American dominance in the Middle East following a stunning victory over a Muslim state. But the other half is alive and well, pushing ahead with the missile defence system bequeathed by the Reagan administration.

This so-called star wars is militarily unproven and, with the end of the cold war, of no apparent urgency. But it is astronomically expensive and, as such, has powerful support within America's industry-led defence community. When Dick Cheney was finding George Bush a defence secretary in 2000, Donald Rumsfeld's chief qualification was his enthusiasm for space-based defence. Hence America's 2002 renunciation of the anti-ballistic missile treaty. Hence the installation of defence systems in Poland and the Czech Republic, in defiance of what was promised to Russia at the end of the cold war. Hence Rumsfeld's frequent jibes against old Europe in favour of "new".

Vladimir Putin's reactive threat this week to retarget his missiles at west Europe was reckless and stupid. Just when nuclear disarmament is again a live issue and his old enemy, Nato, faces defeat in Afghanistan, he tossed red meat to the Pentagon (and Whitehall) hawks. He strengthened the case for a new British Trident and encouraged an arms race that he knows his own country can ill afford, just as it can ill afford to send Europe frantically seeking alternative energy supplies.

Yet nations do not always act rationally, especially those with authoritarian rulers. Putin's belligerence was the predictable outcome of a western diplomacy towards Russia whose ineptitude would amaze even Keynes. Nato's dismissal of Moscow's approach for membership, like the EU's similar cold shoulder, wholly misunderstood Russian psychology. The loss of its east European satellites was not just a loss of empire but revived age-old border insecurity. The pretence that Rumsfeld's installations, which could be placed anywhere, were aimed at "rogue states such as North Korea" was so ludicrous that only Tony Blair believed it.

There was a moment after 1990 when Russia was weak, immature and unstable, and longed for the embrace of friendship. Mikhail Gorbachev, Boris Yeltsin, Margaret Thatcher, Bill Clinton, even Blair in his pre-poodle phase, understood this. Neither side had an interest in reviving the cold war. Under Bush this has been replaced by an assumption that he should somehow dictate the terms of Russia's conversion to capitalism and democracy, even as western leaders cringingly paid court to the dictators of Beijing. This undermined Moscow's internationalists and played into the hands of Putin's hard-liners. It was repeated in Bush's speech in Germany yesterday.

Putin is throwing down a gauntlet not to the west so much as to his own Kremlin successors. He is warning them never to trust the west. To him it remains incorrigibly imperialist, hypocritical in its global morality and unreliable in its treaties. So he is telling them to cause mischief with oil and gas. Deny help over Iran and Kosovo. Stay armed and on guard.

A new study by Ian Kershaw, Fateful Choices: Ten Decisions that Changed the World, examines the options facing world leaders in 1940-41: should Hitler attack Russia; should Japan expand west or south; should America enter the war? The answers now seem embedded in the concrete of history but at the time they might have gone otherwise. Like the 1914 shooting of the Archduke in Sarajevo, the events that trigger conflict are easy to see with hindsight. At the time they might have turned on a penny.

The task of statecraft is to detect the pennies. Were Nato and Europe wise to snub Russia and thus, de facto, dig a new political ravine across Europe? Was America wise to provoke Russia's generals by moving its military presence close to their borders? While defending the west's commercial interests required a firm line, was it wise to visit on Moscow a stream of criticism of its internal regime? Now the west wants to stir Russia's historic ally, Serbia, into nationalist fury by "granting" independence to Kosovo. Why should Russia tell Belgrade to acquiesce and demand from Europe some economic quid pro quo? Why not sit back and laugh as America and Britain find themselves policing yet another Balkan civil war?

We may be witnessing only the paranoid exchanges of three world leaders on their way out. For all its ailments the world is incomparably more stable than it was in 1940. But a strategic risk is being taken with Moscow, and therefore by Moscow in return. Who knows that the Iraq war may seem a footling incompetence alongside the west's misjudgment of Russia over the past decade? Following cold war with cold peace may yet prove a historic error. And it was gratuitously unnecessary.