As November's American presidential elections approach, Barack Obama's message on Iraq is being widely interpreted as "flip-flopping" and a "retreat" from a previously unequivocal stance of fully withdrawing the US occupation forces. This is to misunderstand Obama, who is not someone who shoots from the hip. There is much more to his words than cursory reading could unravel.

His remarks before the 2003 invasion resonated well within the American antiwar movement. His scathing references to the Bush administration's folly and his demands for "ending the war" were probably decisive in winning him the Democratic party nomination against Hillary Clinton, whose vote for war in 2003 ultimately crippled her credibility as the commander-in-chief who would bring it to an end.

Obama himself has reacted angrily to claims of a policy U-turn: "For me to say I'm going to refine my policies is I don't think in any way inconsistent with prior statements and doesn't change my strategic view that this war has to end and that I'm going to end it as president." Earlier this month he resorted to an op-ed article in the New York Times to emphatically state: "On my first day in office, I would give the military a new mission: ending this war."

As always in examining the words of politicians, let alone Obama (who now has 300 foreign policy advisers), the devil is in the details. Here, Obama's "ending the war" declarations begin to look far from reassuring, even before he "refines" his line after meeting the US commander, General Petraeus, in Iraq.

Obama sees Iraq as part of a wider theatre of war and potential wars engulfing the entire Middle East, where US strategic goals and interests are at stake. So his obvious shift on the "surge" operations in Iraq (underlined by deleting criticisms of it from his website last week) is strengthening his call for "redeployment" from Iraq to Afghanistan. His current strategy could be summed up as: de-escalate the war in Iraq, escalate it in Afghanistan, and talk to Iran. On Iran, his offer of talks was coupled with an alarming, Bush-style threat. "I'll do everything in my power to prevent Iran from obtaining a nuclear weapon. Everything," Obama told a gathering of the pro-Israel lobby group, Aipac, in April. He is echoing the sentiments of his famous anti-Iraq war speech in 2002, in which he repeatedly stressed that he was not opposed to all US wars.

It is worth noting that the term withdrawal, let alone a full unconditional withdrawal that will satisfy most of the Iraqi people, has never been part of Obama's vocabulary. His first carefully considered statement on Iraq was made in January last year, when he introduced the Iraq war de-escalation act to Congress. It was then that he envisaged stationing troops in Iraq on a longer-term basis: "A residual US presence may remain in Iraq for force protection, training of Iraqi security forces and pursuit of international terrorists." Using similar phrases, this is what he outlined in the New York Times last week.

To distinguish his policy from that of his rival for the White House, Obama declared: "Unlike Senator McCain, I would make it absolutely clear that we seek no presence in Iraq similar to our permanent bases in South Korea." But it doesn't require rocket science to know that keeping "residual" forces requires heavily fortified areas, installations and a state of readiness to go to war. Unless Obama has discovered something new, such areas are known as military bases. So it is the word "permanent" that separates the two, as McCain may want to stay "100 years" in Iraq. The comparison with South Korea is not heartening, considering massive US bases have been in that country for over half a century.

Obama has even pre-empted a possible line of attack from hawks by chillingly suggesting he would possibly invade Iraq again if necessary. His website states: "He would reserve the right to intervene militarily, with our international partners, to suppress potential genocidal violence within Iraq." The word potential is worth pausing over; it is salutary to remember Bush and Blair occupied Iraq and caused the death of perhaps hundreds of thousands of innocent people for "humanitarian" reasons.

Neither is Obama opposed to signing a military treaty with Iraq. He has two conditions to make Bush's current attempts to impose a pact acceptable: the pact should get Congressional approval, and renounce "permanent" military bases. However, leaked drafts of this colonialist-style pact do not mention the word "permanent" at all. And his "benchmarks" for continued support for the corrupt Iraqi politicians protected by US forces in Baghdad's Green Zone are strikingly similar to those of the Bush administration.

Tactical differences and issues of style aside, Obama's message on occupied Iraq is deeply troubling - not because it has U-turned but because it has been consistent. His 300 foreign policy advisers are making sure that he will not stray from protecting US imperialist interests, even if it does mean launching new wars and bolstering puppet regimes and corrupt dictatorships throughout the "greater Middle East".