AFP/Reuters

FEW will celebrate the fourth anniversary of America's invasion of Iraq on Tuesday March 20th. It was supposed to serve as an example of how to build democracy in the Middle East, but turned into a model for how to wreck a country. It was meant to give warning to rogue regimes and instead strengthened radical states such as Syria and Iran. It was intended to confront Islamist extremism at its source, but intensified the appeal of global jihad. It was planned as a demonstration of America's global power, but ended up sapping its military might in a debilitating insurgency.

Even the final demise of Saddam Hussein, one of the vilest dictators in the world, went wrong. He maintained a striking self-composure in the face of sectarian jeering when he went to the gallows in December. The justifications for the war have collapsed. The pre-invasion rationale was to rid Saddam of weapons of mass destruction, but none were found. The post-invasion objective was the promotion of democracy, but this has fed sectarian tensions in Iraq and led to the rise of Islamists elsewhere, such as Hamas in the Palestinian territories. All that is left is President George Bush's argument that however grim the situation may appear now, it would be grimmer still if America withdrew and abandoned the country to jihadists.

Could it have been different? Perhaps. American forces invaded Iraq with enough strength to defeat Saddam's weakened army, but not enough to establish security. Looting and violence broke out from the moment Saddam's statue was brought down in view of the world's cameras, and violence has worsened every year since. The allies expected to take over a functioning civil service, but discovered the regime had been hollowed out by years of oppression and sanctions.

The disbanding of the army, and the removal of Baath party members, destroyed the remainder of the Iraqi state's structure and flooded the streets with armed and angry men. Plans for the political transition to Iraqi rule were mired in confusion. Resistance to the American presence would probably have emerged, although the errors of the post-Saddam era undoubtedly aggravated the insurgency.

Mr Bush and his entourage dreamed of rolling back dictatorship and extreme Islamism in the same way that Ronald Reagan confronted and defeated communism in Europe. But the Middle East is different, not least because of Arab resentment of America's alliance with Israel and the plight of Palestinians. Mr Bush's lieutenants should have been forewarned by the Reagan administration's experience in Lebanon in 1982. At the time, American-led multinational forces were perceived to be intervening on the side of the invading Israeli army and became the target for Shia militants, who pioneered the use of suicide car bombs against the American embassy and the marines' barracks in 1983.

Mr Bush admits to making “mistakes” in Iraq but not to failure. He rejected the recommendations of the bipartisan Iraq Study Group that suggested a managed withdrawal and diplomatic engagement with Iran and Syria. Instead he is redoubling his bet. He has appointed new commanders and ordered a “surge” of nearly 30,000 troops in an effort to stabilise the capital, Baghdad. American soldiers will now seek to protect the Iraqi population rather than trying just to kill and capture insurgents and terrorists. They are moving out of their secure bases into joint outposts with Iraqi soldiers and police. Success, Mr Bush said this week in a televised address, “will take months, not days or weeks”. But the president may be running out of time.

For many in Iraq, the surge is too little, too late. Most Iraqis have given up on America after four years of occupation and chaos, including the past year of particularly atrocious sectarian violence. Many have fled to neighbouring countries. In America, meanwhile, the advocates of “surge” worry that domestic support is dissolving. The war has sapped Mr Bush's popularity and, with Congress now in Democrat hands, there is political opposition to the surge and growing demands for the troops to be brought home by autumn next year. The debate is no longer about how to achieve “victory” in Iraq, but how to limit America's losses.