There are few American patrols on the streets of Baghdad and soon there will be none. In just over two weeks, on 30 June, US military forces will withdraw from Iraqi cities. The occupation which began six years ago is ending. On every side there are signs of the decline of US influence.
When the Iraqi Prime Minister, Nouri al-Maliki, held a meeting with 300 top military commanders last week a US general who tried to attend was asked to leave. "We apologise to you, but this is an Iraqi meeting and you're not invited," he was told.
Mr Maliki, who was put into power by the US in 2006, spoke of the departure of the troops as if he had been leading an insurgency against them. "Foreign forces have to withdraw from the cities totally," he said in the course of an hour-long speech in which he mentioned America only once. "This is a victory that should be celebrated in feasts and festivals."
Given that the US is Mr Maliki's main ally, this seems to show an astonishing lack of gratitude on his part. US commanders and diplomats comfort themselves by reflecting that Mr Maliki is burnishing his Iraqi nationalist credentials in the months before the crucial parliamentary elections at the end of next January. But his public distancing himself from the US shows that he believes that anti-Americanism has a strong appeal to the majority of Iraqis.
There are other more covert signs of receding American influence. In the years after the overthrow of Saddam Hussein, the Iraqi National Intelligence force was controlled and paid for by the CIA. The agency appointed its chief, General Mohammed Abdullah al-Shahwani, who had long worked for the US. For several years Iraqi intelligence did not even appear in the Iraqi budget and senior Iraqi officers in it all worked with US advisers. Iraqi politicians say that Iraqi Intelligence is now reverting to the control of its own government.
Iraqis are only slowly taking on board that the US is really pulling out. Some 133,000 US troops remain in the country; the last combat troops will depart in August 2010 and the remaining US forces at the end of 2011. The 16,000 Marines who have been in Anbar province west of Baghdad since 2003 will leave Iraq by next spring. But, as Ahmed Chalabi, the head of the Iraqi National Congress and an astute judge of Iraqi politics, says: "Whatever you may hear from American generals in Iraq, Obama has made clear that the US is really pulling out."
The knowledge that the US forces are to go is already transforming the political landscape. It is no longer politic for any Iraqi leader to be identified with the American occupation.
The US forces are leaving behind a country in which security is much better than during the bloodbath of 2006-07, but it is still probably the most dangerous country in the world. Many Iraqis ask if there will be an upsurge of fighting as the US troops go, although violence is already high.
Last week saw serious incidents in Baghdad, as well as northern and southern Iraq, that underscore the fragility of the improved security. The most dramatic attack was the assassination of Harith al-Obaidi, the leader of the main Sunni bloc in parliament, as he was leaving the al-Shawaf mosque in the Yarmouk district of west Baghdad on Friday. The killer shot dead Mr Obaidi, his secretary and three of his bodyguards, before he was cornered by guards and blew himself up with a grenade.
The method of the assassination, and the fact the assassin killed himself, bear the hallmarks of an al-Qa'ida attack. Mr Obaidi had only recently taken over as leader of the Sunni bloc and was a campaigner on behalf of prisoners. The most likely motive is that al-Qa'ida in Iraq, although it has lost much of its strength in the Sunni community from which it springs, wants to show that it can eliminate any Sunni leader who cooperates with the government.
Al-Qa'ida had demonstrated its long reach against a Shia target earlier in the week, when a car bomb blew up in the town of Batha, 225 miles south-east of Baghdad, killing at least 30 people and wounding 65. This appears to be a sectarian attack by al-Qa'ida, geared to killing as many Shias as possible.
In northern Iraq, Kurds and Arabs are engaged in a war of words that has a potential for violence that could surpass anything that al-Qa'ida could launch. At stake is control, along a 300-mile-long unofficial frontier, of areas that are outside the highly autonomous Kurdistan Regional Government but have Kurdish majorities.
In 2003 the Kurds, allied to the US, were able to capture Mosul and Kirkuk, the two biggest cities of northern Iraq. They remained in control of Nineveh province, which is one-third Kurdish and two-thirds Sunni Arab, until provincial elections in January. These elections were won by al-Habda, a Sunni party with an anti-Kurdish platform, under Atheel al-Nujaifi, who is now governor. There have been continual incidents ever since, as al-Habda and the central government in Baghdad try to reassert control.
The Kurdish forces are not giving any ground. On 8 May Mr Nujaifi tried to enter the Kurdish-held town of Bashiqa. The Kurds issued "a shoot to kill" order against him and he eventually turned back. "Nobody admits to issuing the order," says a diplomat in Baghdad, "but if al-Nujaifi had been killed then Arabs and Kurds would have started slaughtering each other all over Nineveh."
When the Sunni police chief tried to enter a Kurdish part of his province a few weeks later his convoy, though it contained Iraqi soldiers, was again forced to retreat by Kurdish forces.
But the Kurds can feel the balance of power swinging against them as the US departs, the Baghdad government grows in political and military strength, and the Arabs in Nineveh and Kirkuk become more assertive. The President of the KRG, Massoud Barzani, has not seen Mr Maliki for many months. "We have better relations with Ankara than we do with Baghdad these days," said one Kurdish leader.
On top of territorial disputes there are deep divisions over oil, discovered in large quantities in the KRG under contracts the Oil Ministry in Baghdad denounces as illegal.
War between Kurds and Arabs is possible, but both sides have a lot to lose. The Kurds, who hold critical posts in the Baghdad government, are much the best organised faction within it. So long as they are part of the government they are much better able to withstand pressure from Turkey, Iran and Syria. Mr Maliki also has a lot to lose. The Iraqi coalition that replaced Saddam Hussein's predominantly Sunni regime was a Shia-Kurdish one. The Kurds have shown over half a century that they can destabilise Iraq and even Saddam was unable to crush them. Mr Maliki may be tempted to take advantage of the current strong anti-Kurdish feeling among Arabs, both Shia and Sunni, to gain popularity before the elections, but it would be a short-sighted and dangerous move.
Although Iraq remains very violent and its government corrupt and dysfunctional, the prospects for the country may not be so bleak as they at first appear. Two wars were fought in Iraq after the fall of Saddam in 2003. One was the insurgency based in the Sunni community against the US occupation. The other was a bloody civil war between Sunni and Shia, at its height in 2006-07. Both these are ending. The US forces are going. The Shia largely won the civil war. Baghdad is now three-quarters Shia and they control the 600,000-strong security forces. It would be difficult, and probably suicidal, for the Sunni community to go back to war. Al-Qa'ida would like to provoke Shia retaliation by repeated atrocities but so far this has not happened.
Iraqi society and the economy remain shattered by 30 years of war and sanctions. But one of the main destabilising factors in Iraq for the last six years has been the presence of a large US army, and with its departure Iraq's many simmering conflicts might just be kept under control.
Read more from the Independent.