Pre-emptive wars, unilateralism, regime-change. Only recently, senior US officials and influential columnists claimed that these were not just good ideas but were also the only viable options for US foreign policy. Today, with more than 900 American soldiers dead, 10,000 coalition troops wounded, $90bn spent and the justification for war dismissed as a massive intelligence failure, these ideas lie buried in Iraq. They will not be missed. America's foreign policy will be better off without them. But there is a danger that, in their haste to distance themselves from these discredited notions, policymakers will also jettison some far more valuable ideas.

Some of the failed ideas are very familiar, and have received rigorous post mortems as the chaos has surged in Iraq. The belief that America could rely on military solutions to security threats proved as defective as the belief it could dispense with diplomacy. The violent unrest in Iraq exposed the limits of US military force, its technical superiority notwithstanding. So America had to rediscover diplomacy as it sought to get the UN Security Council to pass a resolution endorsing the June handover of power in Iraq.

Other ideas may be less apparent. America's disappointments in Iraq dealt a blow to a world view that - for all policymakers' references to the terrorist attacks of September 11 2001 as an epochal event - harkens back to the cold war. Consider America's two main responses to the attacks: instead of concentrating on fighting the stateless civilian networks responsible, it launched military assaults against two nation-states. First, it correctly attacked Afghanistan, whose government had been taken over by these foreign networks. The second target was Iraq, a nation-state with a standing army and a dictator evocative of the cold war era.

In 2002, Condoleezza Rice, the national security adviser, said: "September 11 clarified . . . the kinds of threats that you face in the post-cold-war era." But it is clear that cold war instincts did not disappear overnight. Faced with the prospect of waging a new kind of war against a new kind of stateless opponent, the Bush administration chose instead to fight a familiar enemy whose face and address it knew. Or thought it knew: US troops soon found themselves fighting not enemy soldiers but -fighters whose nationalities and motives are as hard to pin down as their chain of command.

If Iraq proves fatal to the cold war mindset, we should not mourn its passing. But America's experience there has also undermined some valuable ideas. The need to push for a transformation of the Middle East is one. The unspeakable, politically incorrect conclusion creeping into many influential minds in Washington is that the Middle East is "incurable": peace, prosperity and political freedom there are goals that are out of reach for at least one or two generations of US policymakers. The region's economic backwardness, dysfunctional politics and deeply entrenched social ills are too much to take on, according to this new post-Iraq realism. Rather than attempting to accelerate progress in the Middle East, US policymakers should try to stop the rut from deepening and, more importantly, keep the region's violence and instability from spreading abroad.

This conclusion is too demoralising to be made explicit. New plans will undoubtedly be hatched and proposed. But it will be a long time before another American-led expedition sets sail to rid the Middle East of its ills at a stroke. Yet while the world is better off without another huge, ill-conceived venture in the Middle East it would be a dangerous mistake to abandon hopes for - and efforts to encourage - reform in the region.

Closely linked to the new pessimism about the Middle East is growing scepticism about promoting democracy abroad. Lurid news stories about warlordism in Afghanistan and bloodshed in Iraq give a daily boost to misgivings about exporting democracy. Of course, US leaders will continue to proclaim America's historical commitment to democracy abroad. Yet they remain silent about what they would do if - as is quite possible - anti-American fundamentalists came to power in a free and fair election in a Muslim country.

Stability and security have become an American obsession. US politicians increasingly see the promotion of democracy abroad as a threat to both of these goals, with the result that it is becoming a cause with a dwindling constituency. The war in Iraq has weakened this support further. It is a sad irony that the political will to promote democracy abroad is a casualty of a war that, many of its promoters said, was waged in democracy's name.

The writer is editor of Foreign Policy magazine