Whatever the Iraq war was about, we were assured, it definitely wasn't about oil. Tony Blair called the idea a "conspiracy theory". It was about democracy and dictatorship, weapons of mass destruction and human rights, anything but oil. Donald Rumsfeld, then US defence secretary, insisted the conflict had "literally nothing to do with oil". When Alan Greenspan, former chairman of the US Federal Reserve, wrote last autumn, "Everyone knows: the Iraq war is largely about oil," he was treated as if he were some senile old gent who'd embarrassingly lost the plot.

That argument is going to be a good deal harder to make from next week, when four of the western world's largest oil corporations are due to sign contracts for the renewed exploitation of Iraq's vast reserves. Initially, these are to be two-year deals to boost production in Iraq's largest oilfields. But not only did the four energy giants - BP, Exxon Mobil, Shell and Total - write their own contracts with the Iraqi government, an unheard-of practice: they have also reportedly secured rights of first refusal on the far more lucrative 30-year production contracts expected once a new US-sponsored oil law is passed, allowing a wholesale western takeover. Big Oil is back with a vengeance.

It's a similar story when it comes to the future of the US occupation itself. The last thing on anyone's mind, we were told when the tanks rolled in, was permanent US control, let alone the recolonisation of Iraq. This was about the Iraqis finally getting a chance to run their own affairs in freedom. But five years on, George Bush and Dick Cheney are putting the screws on their Green Zone government to sign a secret deal for indefinite military occupation, which would effectively reduce Iraq to a long-term vassal state.

In April, I was leaked a draft copy of this "strategic framework agreement", intended to replace the existing UN mandate at the end of the year. Details of the document, which came from a source at the heart of the Iraqi government, were published in the Guardian - including indefinite authorisation for the US to "conduct military operations in Iraq and to detain individuals when necessary for imperative reasons of security". Since then, much more has emerged about the accompanying "status of forces agreement" the US administration wants to impose: including more than 50 US military bases, full control of Iraqi airspace, legal immunity for US military and private security firms, and the right to conduct armed operations throughout the country without consulting the Iraqi government.

This goes far beyond other such agreements the US has around the world and would shackle Iraq with a permanent puppet status. Not surprisingly, it has led to uproar in the country and opposition in the US, where congress will be denied a vote on the arrangement because the administration has chosen not to call it a treaty.

But it also evokes powerful memories in Iraq, which has been down this road before. After Britain invaded and occupied Iraq during the first world war, it imposed a strikingly similar treaty on its puppet government in 1930 in preparation for the country's nominal independence. Just as in George Bush's version, Britain awarded itself military bases, the right to conduct military operations, and legal immunity for its forces - though the proposed new US powers and restrictions on Iraqi sovereignty go even further than in the pre-war colonial treaty.

To add to this sense of imperial revival, the four oil companies now preparing to return in triumph to Iraq were the original partners in the Iraq Petroleum Company, which Britain gave a free hand in the 1920s to dine off Iraq's wealth in a famously exploitative deal. The Anglo-Iraqi treaty and those bitterly unjust oil concessions dominated Iraqi politics for decades, feeding riots, uprisings and coups until the monarchy was overthrown, the tables turned on the oil companies and the British were finally sent packing by the radical nationalist General Qasim in 1958.

The 50th anniversary of the 1958 revolution appropriately falls next month. But Bush and Cheney seem increasingly determined to force through both their security agreement and the stalled law for the privatisation of Iraq's oil industry before the US election. The signs are that, despite intense Iraqi opposition, a combination of strong-arm tactics, bribery and some watering down of the most extreme US demands may yet secure the full imperial package.

When Bush contradicted Iraqi prime minister Nouri al-Maliki earlier this month on the occupation deal and predicted: "If I were a betting man, we'll reach an agreement with the Iraqis," he sounded as if he knew what he was talking about - rather as he did when he explained a couple of weeks ago that he was "confident" Gordon Brown would not after all be cutting British troop numbers in Basra according to any fixed timetable. Meanwhile, Iraq's foreign minister, Hoshyar Zebari, is suddenly sounding similarly confident about "progress" on the oil law because "the Americans are very keen".

Perhaps they are all coming to believe the Bush administration propaganda that the surge has succeeded and Iraq is starting to "fix itself" in time for the US election, as the Economist's cover story put it last week. Much is still being made of the decline in US casualties and resistance attacks to 2004 levels, even though the factors behind that drop are widely acknowledged to be contingent and precarious. Given the carnage of the past few days alone - including seven US soldiers killed since the weekend and a Baghdad car bomb that butchered 65 people - as well as this week's withering US Government Accountability Office report on the administration's claims of "progress" in Iraq, any other view would seem perverse.

What is certain is that, if Bush's blueprint for indefinite foreign rule in Iraq and the takeover of its oil is forced down the throats of the Iraqi people, resistance and bloodshed will increase. Of course, it's true that the US and Britain didn't invade Iraq only for its oil. It was a projection of American power in the world's most strategically sensitive region, with oil at its heart, which has brought catastrophe to Iraq and great danger to the Middle East and the wider world. That's why the struggle to restore Iraq's independence matters far beyond its borders - it is a global necessity.

s.milne@theguardian.com