These days, when I drive around Baghdad, I sit in the back seat of the car with gauze curtains drawn down so nobody on the street can see me. I have a second car following 100 yards behind to make sure we are not trailed. We try to avoid police and army checkpoints in case they are death squads. My driver, a Sunni Muslim, is rightly frightened of the overwhelmingly Shia police and police commandos. He has fake identity papers so that it is no longer clear to which religious community he belongs.
This may not be enough. Coming from the airport, we avoid most checkpoints by taking a serpentine route through the city. At one moment we roar along a highway and then, still at speed, we abruptly divert down an alleyway, weaving between heaps of rotting garbage. I have always known roughly where Sunni and Shia live in Baghdad, but I am now acquiring detailed knowledge of its sectarian geography. A small mistake could have lethal results. The cemeteries are full of Iraqis who were caught in the wrong district.
This vast city of seven million people, almost the size of London, is breaking up into a dozen cities, each one of which is becoming a heavily armed Shia or Sunni stronghold. Every morning brings its terrible harvest of bodies. Many lie in the street for hours, bloating in the 120F heat, while others are found floating in the Tigris river.
In June, 1,595 bodies, often tortured with an electric drill or by fire, were delivered to the Baghdad morgue. In July, the violence was far worse.
In all of Iraq, in June, 3,149 civilians are known to have been killed, more in one month than the total death toll in Northern Ireland in 30 years of violence.
Into this maelstrom, President George Bush is ordering 4,000 extra American troops in a bid to control the civil war in Baghdad (absurdly, Bush and Tony Blair reject the phrase "civil war" despite the all-too-visible sectarian carnage). Many embattled Sunni districts will welcome the Americans, but the majority in Baghdad are Shia and they already see the US as playing sectarian politics in order to shore up imperial control.
"The Americans are not honest brokers," one former minister told me. "They switch their support between the Shia, Sunni and Kurds in order to serve their own interests." Already, US forces are attacking offices and arresting officials of the main Shia militia the Mehdi Army, followers of the radical nationalist cleric Muqtada al-Sadr. The US may be joining, not ending, the civil war.
I first came to Baghdad, one of the great cities of the world, in 1978, a year before Saddam Hussein assumed supreme power. It was never a pretty city, but I found it deeply attractive. I'd sit near Abu Nawas Street on the east bank of the Tigris, 400 yards wide at this point, eating mazgouf (river fish) cooked over wood fires and drinking arak, a liquor made from dates.
I visited the second-hand book shops in al-Muttanabi Street, where there used to be a market with dusty old volumes in English and Arabic laid out for sale on the ground every Friday. At the al-Baghdadi auction house in the al-Adhamiyah district, I bought richly-patterned carpets and Shia religious art - primitive but striking portrayals of battle, suffering and betrayal.
Not any more. The mazgouf restaurants along Abu Nawas, where I used to sit at night drinking arak, are almost all closed. If they re-open, it would be dangerous for them to serve alcohol. In my hotel, inhabited these days solely by foreign journalists, the local police turned up a few weeks ago and, claiming to speak on behalf of the Tourism Ministry, now Islamic-run, demanded that alcohol no longer be served. Even reaching Abu Nawas Street is a dangerous challenge these days since American troops have sealed off one end of it.
The last time I was there, I talked to the dispirited owner of one empty restaurant who said he was trying to leave the country. He added that the only customers he had served recently turned out to be gangsters who fired their pistols into the air when asked to pay the bill. He gloomily pointed out the bullet holes in the corrugated iron roof.
I suppose the booksellers of al-Muttanabi are still open, though when I last visited the market, part of it had caught fire after being hit by an errant mortar-bomb and was still smouldering. An elderly man, 20 years in the book trade, was weeping because the flames had consumed his entire stock of books on Iraqi folklore.
In any case, it is too risky these days for me to go anywhere near al-Muttanabi. The street runs directly off al-Rashid Street, the commercial heart of Baghdad under British rule but now a dangerous slum haunted by criminal gangs liable to kidnap any foreigner foolish enough to appear in their neighbourhood.
As for the al-Baghdadi auction house, it has been shut since the US invasion in 2003. Al-Adhamiyah, the district in which it stands, has become a Sunni Muslim stronghold where the mosques call the men to fight if the strongly Shia Baghdad police try to enter it. Messengers race through the streets knocking on doors and asking every family to send one of their sons with a gun and ammunition to fight the Shia incursion. Local people recently held a demonstration demanding the withdrawal of a largely Shia army battalion from al-Adhamiyah and its replacement by a Sunni unit.
Baghdad as I knew it is dying. No doubt there will be a city of that name on the banks of the Tigris in the future. But its special magic, the fact that gave the city its peculiar allure, was its complex ethnic and religious mix of Shia, Sunni and Kurds. It is this diversity of cultures that is disappearing. Small Christian sects present in Mesopotamia since the second century after Christ are finally being dispersed. They know they are the targets both of Islamic fundamentalists and kidnappers who see Christians as being rich and defenceless, a fatal combination in present-day Iraq.
Baghdad is joining other cosmopolitan cities in the Middle East - Alexandria in Egypt, Smyrna in Turkey and Beirut in Lebanon - which have been torn apart by sectarian and ethnic cleansing over the last century.
There are few neat sectarian lines dividing the communities in Baghdad. The Shia dominate the east bank of the Tigris, with the exception of the Sunni stronghold of al-Adhamiyah. The great Shia bastion is al-Sadr City, previously Saddam City and before that al-Thawra, with a population of about two million. This is the impoverished Shia heartland of the Iraqi capital and the base of the Mehdi Army and Muqtada al-Sadr. Saddam Hussein's intelligence service regarded its teeming people with deep suspicion.
On the other side of the Tigris lies al-Qadamiyah, a venerable Shia area and centre of pilgrimage that was once a separate town north of Baghdad but is now absorbed into the city. The pilgrims travel from across the Shia world to visit the Khadimain, the golden-domed Shia shrine, containing the tombs of two Shia imams. I always enjoyed the streets full of gold and jewellery shops surrounding the shrine, and the pious informality with which poor pilgrims sat down in its vast marble-paved courtyard to sleep or cook their food over little stoves.
I do not want to romanticise the old Baghdad that is now passing away as a centre of multiethnic understanding and amity. The city has, on the contrary, an extraordinarily violent past. It was founded as a round city by Abu Ja'far al-Mansour, the second Abbasid caliph, in 762AD, on the fertile banks of the Tigris, where that river comes close to the Euphrates.
At the centre of the trade routes between east and west, it soon became one of the richest cities in the world. Its luxurious palaces, merchant quarters and crowded quays were the backdrop for the tales in The Thousand and One Nights.
The Mongols sacked the city in 1258, the Ottomans held it for hundreds of years and the British for a few decades. Iraqis have an acute sense of their own history. Different communities have their heroes and villains. Eighteen months ago, 1,200 years after Caliph al-Mansour died, gunmen, probably Shia, attached explosives to his statue near Baghdad railway station and blew it to pieces.
At the time I first started to visit Iraq in the late 1970s, the prospects for the city looked good. Oil revenues were soaring and administration was effective. New roads, bridges, hotels, schools and hospitals were being built across the city. I did not immediately recognise the bloodthirstiness of the regime because there was a hiatus in Baghdad's war with the Kurds, and it was only the following year, in 1979, that Saddam executed one-third of his Revolution Command Council and took over supreme power.
Foreign journalists were supposedly closely watched, but my minder from the Ministry of Information, a menacing figure in many correspondents' reports from Iraq, had managed to miss me at the airport and we spent several days looking for each other. Iraq was still one of the most secular countries in the Middle East. In Basra, the main complaint among Iraqis about Kuwaitis was that they were crossing the border and drinking the city dry of beer.
It turned out that I was not watching a new dawn in Baghdad, but its last days of peace and normality. Two years later, Saddam plunged into a disastrous war with Iran that lasted until 1988. Only a few Iranian bombs and missiles fell on the capital. At first, the manic building boom continued, using borrowed money from Arab oil states frightened by the Iranian revolution. Big new hotels such as the al-Rashid, Meridien Palestine and Ishtar Sheraton opened, their tall towers rising above the palm trees.
But the optimistic and well-educated young men I had met when I first visited the country were being forced into the army. The personality cult of Saddam Hussein reached grotesque proportions as pictures and statues of the leader, dressed as everything from Bedouin sheikh to Kurdish mountaineer, were erected in each street.
The physical appearance of Baghdad only began to change in 1991, during the six-week bombardment by US bombs and missiles. Explosions tore apart the bridges, power stations and oil refineries. On the morning after the first missiles landed, I walked through the mist to look at a telecommunications centre that at first sight appeared to have survived. As I got closer, I could see that its interior was a mass of wreckage.
Missiles has turned the military intelligence headquarters into a concrete pancake. A great column of oil-black smoke rising from the Dohra refinery in south Baghdad was visible 30 miles away to Iraqi troops retreating from Kuwait. The city ran out of fuel because Saddam had failed to store any. I bought black-market petrol in a market near Saddam City, but it was so watered down that my car would grind to a halt at times, emitting puffs of black smoke and white steam.
On the surface, Baghdad recovered swiftly from the 1991 Gulf War. Reconstruction of bridges, power stations and refineries proceeded surprisingly quickly. Old machinery was cannibalised. One of the four chimneys of the Dohra power station, highly visible from the rest of Baghdad, was rebuilt and painted in the Iraqi colours. Saddam indulged his megalomania by building ornate palaces and giant mosques all over the city.
But the recovery was never as complete as it looked. War and United Nations sanctions relentlessly impoverished the people of Baghdad. The currency collapsed. Most people worked for the state, and the government had little money. University professors and teachers in schools were soon earning less than $10 a month. They fled abroad or looked desperately for other jobs.
Soon there were millions of people in Baghdad living on the edge of destitution. I saw men standing in the market during the furnace-like summer heat trying to sell a few plates or ungainly gilt furniture. Crime became common. The government started cutting off the hands and ears of thieves and showing the results on television. Iraqi society became like a lump of wet sugar ready to dissolve as soon as Saddam's iron rule was ended.
Even so, the ferocity of the looting in April 2003 after Saddam fled was astonishing. Iraqis, both Arabs and Kurds, have always looted when they could get away with it. But the savage destructiveness with which ministries, government offices, museums and even hospitals were torn apart by the poor of Baghdad was like a social revolution. It was as if they were taking revenge against the Iraqi state that had oppressed them for so long.
I visited the Iraqi Natural History Museum, where the looters had taken the trouble to decapitate the life-size model dinosaurs in the forecourt. Inside, they used their rifle butts to smash all the glass cases containing examples of Iraqi wildlife in its natural environment. Only a stuffed white horse, given (when alive) to Saddam by the King of Morocco had been spared.
Baghdad never really recovered from the looting. For weeks, the Americans made no real effort to stop it. Their generals were believers in their own propaganda, which claimed that the troubles of Iraq all stemmed from Saddam Hussein and foreign "terrorists" despatched by Osama bin Laden or Iranian ayatollahs. A month after the fall of Baghdad, I would still see elderly white pick-ups piled high with loot passing without hindrance through US checkpoints on their way to markets in Fallujah and Ramadi.
Baghdad was soon full of burnt-out government buildings. People who thought that occupation meant liberation were rapidly disillusioned when the US took over Saddam's palace complex and renamed it the Green Zone. It instantly became a symbol of foreign conquest, whose inhabitants were notoriously isolated from the grim reality of Iraq. Ghazi al-Yawer, the US-appointed president of Iraq in 2004-05, remarked scathingly: "The difference between the Green Zone and the rest of Baghdad is like that between a safari park and the real jungle."
The physical face of Baghdad was changing in another way. In August 2003, the first suicide bombers driving vehicles packed with explosives attacked the Jordanian embassy and the UN headquarters on Canal Street. Nobody was safe. Again and again, queues of young men, desperate for jobs, were targeted as they waited at recruitment centres for the army and police.
I went to the shattered Red Cross headquarters, half-protected by a wall of sandbags, where workmen were standing in a water-filled crater trying to mend a broken pipe. Almost every prominent building was targeted at one time or another. The Independent's suite in the al-Hamra hotel was finally destroyed in November 2005 when two suicide bombers tried to breach the concrete blast-wall outside and almost succeeded. I was away, but my colleague Kim Sengupta was cut by flying glass as his room was ripped apart by the blast.
The appearance of central Baghdad changed rapidly because of the suicide-bombing campaign. Enormous blast walls, made out of concrete sections looking like giant grey tombstones, snaked across the city. They protected all US and Iraqi government facilities as well as hotels and houses used by foreigners. They sealed off streets and districts, often to the dismay of shopkeepers whose customers could no longer reach them. The concrete blocked so many roads that there was a permanent traffic jam in the centre of the city. Journeys of a few miles could take several hours.
American and British officials have often complained over the past three years that the media never report the good news from Iraq. It is therefore worth recording that, by this July, traffic jams in Baghdad were no longer a problem. I used to budget 45 minutes to travel between my hotel and the Green Zone; now I can do it in 15 minutes.
The reason, however, is scarcely to the credit of the Iraqi government or the US. The streets of Baghdad are astonishingly empty of cars and vehicles because people are too frightened to go out or cannot afford the high price of petrol - or have fled abroad.
Iraq has an oil economy and the lack of fuel is the final insult. Even at the worst of times under Saddam, Iraqis enjoyed almost free petrol, diesel and kerosene. Because of the failure to improve the supply of electricity since 2003, just about everyone in Baghdad has bought a generator, though these are often small. Now, fuel for a medium-sized generator costs $10 to $15 a day - far more than most people can afford. Instead, they must sit in the dark. Water is scarce because the supply pressure is low and it needs to be pumped.
I do not know if I will go back to Baghdad. The occupation, sectarian warfare and collapse of the economy have destroyed it. Most of my friends have fled. The few that have stayed tell terrible stories of atrocities.
Often, my two cars are the only ones on a once-crowded road. The government in the Green Zone is as remote from its own people as if it was on a separate planet. Baghdad may rise again, but it will be a different city.
Patrick Cockburn is the author of 'The Occupation: War, resistance and daily life in Iraq', to be published by Verso in October
A history of war and peace
Founding of the city of Ctesiphon on the banks of the Tigris, 20km south of modern-day Baghdad, by the Parthian Empire. When it fell to the Arab Islamic armies in 637, Ctesiphon is believed to have been the largest city on earth.
Caliph al-Mansour creates the new city of Baghdad. For 500 years, the Abassid capital is the centre of learning, attracting scholars from around the world. Baghdadis call this the Golden Age.
In one of the worst wholesale massacres of a single city, the Mongol armies sack Baghdad and kill up to 800,000 people. Its vital irrigation system and world-famous libraries ruined, the city never recovers.
After nearly 300 years of instability and a second sacking by the armies of Timur in 1401, Baghdad is taken over by the Ottoman Sultan Suleyman I. In the period of peace that follows, the city flourishes.
Under Lt-Gen Sir Stanley Maude, 600,000 British troops enter Baghdad after defeating the Turkish armies. After just two years, Iraqis rise up and Britain finds itself mired in a violent insurgency.
With Baghdad as his capital, King Faisal I finally achieves full independence from Britain, despite having been made King of Iraq in 1921. Baghdad becomes a city of political intrigue as military leaders stage a series of coups until the monarchy finally falls in 1958.
After a ruthless cull of his rivals, Saddam Hussein becomes supreme leader. Oil wealth allows lavish spending on his capital's infrastructure, which he portrays as an example of his regime's success.
US-led forces bomb Baghdad in response to Saddam's invasion of Kuwait. UN sanctions against the Iraqi regime result in a rapid deterioration in the quality of life in the capital.
The US-led invasion sees the capital heavily bombed again. After the city's fall, much of its cultural heritage is lost to looting. Baghdad quickly earns the title of the world's most dangerous city.
After the bombing of a Shia shrine in the city of Samarra, Baghdad's Sunni and Shia communities in effect declare civil war against each other.