If British troops are indeed withdrawn from Iraq by next June, it will signal the end of the most shameful and disastrous episode in modern British history. Branded only last month by Lord Bingham, until recently Britain’s most senior law lord, as a “serious violation of international law,” the aggression against Iraq has not only devastated an entire country and left hundreds of thousands dead — it has also been a political and military humiliation for the invading powers.

In the case of Britain, which marched into a sovereign state at the bidding of an extreme and reckless US administration, the war has been a national disgrace which has damaged the country’s international standing. Britain’s armed forces will withdraw from Iraq with dishonor. Not only were they driven from Basra city last summer under cover of darkness by determined resistance, just as British colonial troops were forced out of Aden 40 years ago — and Iraq and Afghanistan, among other places, before that. But they leave behind them an accumulation of evidence of prisoner beatings, torture and killings, for which only one low-ranking soldier, Cpl. Payne, has so far been singled out for punishment.

It’s necessary to spell out this brutal reality as a corrective to the official tendency to minimize or normalize the horror of what has evidently been a criminal enterprise — enthusiastically supported by David Cameron and William Hague, it should be remembered, as well as Tony Blair and his government — and a reminder of the dangers of escalating the war that can’t be won in Afghanistan. It was probably just as well that the timetable for British withdrawal from Iraq was given in a background military briefing, after Gordon Brown’s earlier schedule for troop reductions was vetoed by George Bush.

But in any case, in the wake of Barack Obama’s election on a partial withdrawal ticket, the latest plans look a good deal more credible. They are also welcome, of course, even if several hundred troops are to stay behind to train Iraqis. It would be far better both for Britain and Iraq if there were a clean break and a full withdrawal of all British forces in preparation for a comprehensive public inquiry into the Iraq catastrophe. Instead, and in a pointer to the shape of things to come, British troops at Basra airport are being replaced by US forces.

Meanwhile, the real meaning of last month’s security agreement between the US and Iraqi governments is becoming clearer, as Obama’s administration-in-waiting briefs the press and officials highlight the small print. This “status of forces agreement”, which replaces the UN’s shotgun mandate for the occupation forces at the end of this month, had been hailed by some as an unequivocal deal to end the occupation within three years. There’s no doubt that Iraq’s Green Zone government, under heavy pressure from its own people and neighbors such as Iran, extracted significant concessions from US negotiators to the blanket occupation license in the original text. The final agreement does indeed stipulate that US forces will withdraw by the end of 2011, that combat troops will leave urban areas by July next year, contractors and off-duty US soldiers will be subject to Iraqi law and that Iraqi territory cannot be used to attack other countries.

The fact that the US was forced to make such commitments reflects the intensity of both Iraqi and American public opposition to the occupation, the continuing Iraqi resistance war of attrition against US forces, and Obama’s tumultuous election on a commitment to pull out all combat troops in 16 months. Even so, the deal was denounced as treason — for legitimizing foreign occupation and bases — by the supporters of the popular Shiite leader Moqtada Sadr, resistance groups and the influential Association of Muslim Scholars.

And since his November triumph, Obama has gone out of his way to emphasize his commitment to maintaining a “residual force” for fighting “terrorism”, training and protection of US civilians — which his security adviser Richard Danzig estimated could amount to between 30,000 and 55,000 troops.

Briefings by Pentagon officials have also made clear this residual force could remain long after 2011. It turns out that the new security agreement can be ditched by either side, while the Iraqi government is fully entitled to invite US troops to remain, as explained in the accompanying “strategic framework agreement”, so long as its bases or presence are not defined as “permanent”. And given that the current Iraqi government would be unlikely to survive a week without US protection, such a request is a fair bet. Combat troops can also be “re-missioned” as “support units”, it transpires, and even the last-minute concession of a referendum on the agreement next year will not, the Iraqi government now says, be binding.

None of this means there won’t be a substantial withdrawal of troops from Iraq after Obama takes over the White House next month. But how far that withdrawal goes will depend on the kind of pressure he faces both at home and in Iraq. The US establishment clearly remains committed to a long-term stewardship of Iraq. The Iraqi government is at this moment negotiating secret 20-year contracts with US and British oil majors to manage 90 percent of the country’s oil production. The struggle to end US occupation and control of the country is far from won.