It’s not quite over yet, but the Iraq war is in its last days. US president Barack Obama, speaking overnight at Fort Bragg, North Carolina, welcomed home American troops, saying “the final work of leaving Iraq has been done”. The remaining troops will leave Iraq by the end of the year.

The Iraq war has been critical to Obama’s political identity. When much of the Democratic Party vacillated, he was clear and consistent in his opposition to the invasion. His 2008 primary opponent, Hillary Clinton, had voted in favor of it; that in itself need not have been fatal, but she seemed tone deaf in her failure to understand that a convincing explanation and apology for that vote was required. Had she given it, she would now be president.

Obama last night didn’t mention his opposition to the war — partly because that would have been awkward in front of a military audience, but mostly because he didn’t have to. Everyone knows that he won election in part as an acknowledgement that the war had been a mistake and on a promise to end it. That promise has now been kept.

There’s no doubt that the withdrawal from Iraq is popular. Whatever their initial views about it, most Americans are sick of the war, which has cost almost 4500 American lives (and, of course, a great many more Iraqis — a point Obama neglected to mention). It’s telling that Republican Mitt Romney chose the occasion to attack Obama over the economy, not over the withdrawal itself.

But that doesn’t mean that the Republicans have returned to reality when it comes to foreign policy. Indeed, one of the odd things about the Iraq debate is how little attention was paid to the facts on the ground, starting with the Bush administration’s lack of planning for postwar reconstruction. The same tendency can be observed now with the Republican debate over how to treat Iran, which never seems to consider what effect the various bellicose proposals would actually have.

Karl Rove famously said “We’re an empire now, and when we act, we create our own reality” — as distinct from his opponents, who believed “that solutions emerge from your judicious study of discernible reality” — and although out of office his party has not lost that mindset.

Noah Millman recently argued that “foreign policy, at least on the GOP side, is now basically a branch of the culture war” — that Republicans had more or less lost interest in foreign policy for its own sake, and were framing their rhetoric on the subject primarily to appeal to the cultural prejudices of white working-class voters as part of their strategy for next year’s election.

The roots of this approach, however, go back at least as far as Vietnam, where so much of Nixon administration policy was shaped not by what it could achieve on the ground in south-east Asia, but by the reactions of its domestic enemies. And ever since a large part of the Republican Party has been driven by the desire for revenge against the counter-cultural left and so-called “liberal media” that it blames for that defeat.

But Vietnam, for all its criminal ineptitude, involved a real enemy.

Communism was every bit as dark a force as its opponents made out. Since the end of the Cold War, those on the right have been desperately searching for a substitute. Now they claim to have found it in the shape of the dreaded “Islamists”.

But al-Qaeda is not North Vietnam, and unlike with the 1973 Paris peace accords, there is no opposing army waiting to move into Baghdad when the Americans leave.