US Iraq withdrawal marks new dawn
For 40 years, Iraq has been one of the most damaged countries on earth.
And yet today, as the Americans pull down their flag and leave, some Iraqis hope that their country's luck may be turning.
The chain of events has been a terrible one. In the 1970s, Saddam Hussein became the power behind the throne, and then president.
In 1980 he attacked Iran, starting an eight-year war which killed a million people.
In 1990 his invasion of Kuwait led to the first Gulf War, and then the Kurdish and Shia rebellions, which he crushed with great bloodshed. The 1990s were marked by UN sanctions which impoverished almost the entire population - except for those around Saddam himself.
In 2003 the American-led invasion of Iraq and overthrow of Saddam led to a savage civil war which is still not finished.
The United States leaves behind a country embittered by the occupation. If you go to Sadr City, the vast, poor, predominantly Shia suburb of Baghdad, most people curse the Americans and blame them for everything bad that has happened since the invasion.
Yet it was American army engineers who worked with courage and generosity to provide Sadr City with clean water and a proper sewage system.Invasion 'on the cheap'
At the national level the Americans turned Iraq into an open democracy, and made it possible for the Shia majority to take over political power from the Sunni minority.
But the problem was always the lack of understanding of Iraq which many Americans, from the top down, displayed.
A senior Iraqi politician met President George W Bush shortly before the 2003 invasion, and warned him about the problems of the Sunni-Shia division. He told me later this seemed to come as a complete surprise to the president.
At the insistence of the then Defence Secretary, Donald Rumsfeld, the invasion was carried out on the cheap, with too few soldiers.
And so, at the start of the occupation, American troops stood by and watched as looters attacked Iraq's patrimony: notably, of course, the world-famous archaeological museum.
Fifteen thousand priceless artefacts were stolen over three days. A senior museum official begged the Americans with tears in his eyes to stop the looters. They refused.
Over the years many dedicated American officials and soldiers did their level best to improve things.
But US soldiers and security contractors often behaved in a way which enraged ordinary Iraqis. Anyone driving too close to an American vehicle by accident was liable to be shot, and it was the ordinary soldier or contractor who decided what was too close. Large numbers of people died like this.
Others were kept in jail for long periods, merely on the suspicion of a soldier or because they were denounced by a personal enemy.Hopeful future
It was only when General David Petraeus took command in Iraq that the Americans began to see a way out of the problem.
Gen Petraeus understood the country and the war better than his predecessors. His famous surge, which brought in large numbers of extra soldiers, took advantage of the fact that the civil war was starting to run out of steam.
Iraqis are feeling a little gleam of optimism for the first time in 40 years”
The terrible casualty figures, sometimes thousands of deaths a month, began to ease off. The world's media lost interest in Iraq. Soon only the worst suicide bombings would even get a mention in the newspapers and on television. It gave the impression the problem had gone away.
There is still violence here: in the past month there were 79 bomb attacks. But that compares with 30 a day in the summer of 2007.
The training and equipping of Iraq's soldiers and police - another American priority - is showing results. The police and soldiers at the check-points in the streets and roads look tough and self-reliant. Their weapons and body-armour are first-class.
Yet not everything is better. There are power outages virtually every day, a direct result of the early violence after the invasion. If the Americans had restored the electricity supply during their eight years here, they might not be so unpopular now.
Overall, though, Iraqis are feeling a little gleam of optimism for the first time in 40 years. Eventually - the government claims by 2017 - Iraq will become one of the world's richest oil-producers again.
Because of the shift in power from Sunnis to Shias, Iraq is now much closer to Shia Iran than the Americans would like. But so far it has maintained its independence. Iraqi politicians see themselves as a bridge between the US and Iran, not an Iranian subsidiary.
If Iraq becomes wealthy, if it can stay more or less democratic, if it can finally bring terrorism to an end, then the 40 years of horror may be over.
Its people deserve a little good luck at last.