Eyevine

AFTER all the blood and blunders, people are right to be sceptical when good news is announced from Iraq. Yet it is now plain that over the past several months, while Americans have been distracted by their presidential primaries, many things in Iraq have at long last started to go right.

This improvement goes beyond the fall in killing that followed General David Petraeus's “surge”. Iraq's government has gained in stature and confidence. Thanks to soaring oil prices it is flush with money. It is standing up to Iraq's assorted militias and asserting its independence from both America and Iran. The overlapping wars—Sunni against American, Sunni against Shia and Shia against Shia—that harrowed Iraq after the invasion of 2003 have abated. The country no longer looks in imminent danger of flying apart or falling into everlasting anarchy. In September 2007 this newspaper supported the surge not because we had faith in Iraq but only in the desperate hope that the surge might stop what was already a bloodbath from becoming even worse (see article). The situation now is different: Iraq is still a mess, but something approaching a normal future for its people is beginning to look achievable.

The guns begin to fall silent

As General Petraeus himself admits, and our briefing this week argues, the change is fragile, and reversible (see article). But it is real. Only a few months ago, Iraq was in the grip not only of a fierce anti-American insurgency but also of a dense tangle of sectarian wars, which America seemed powerless to stop. Those who thought it was just making matters worse by staying on could point to the bloody facts on the ground as evidence. But now it is time to look again. Each of those overlapping conflicts has lately begun to peter out.

A few Sunnis, motivated by Islam or simple resentment of foreign military occupation, continue to attack American forces. But many Sunni tribes, repelled by the atrocities committed by their former and often foreign allies in al-Qaeda, have joined the so-called Sunni awakening, the Sahwa, and crossed over to America's side. At the same time, Sunnis and Shias have stopped killing each other in the vast numbers that followed the blowing up of a Shia shrine in early 2006. General Petraeus's surge is only one reason for this. Another reason, less flattering to the Americans, is that after last year's frenzied ethnic cleansing fewer neighbourhoods are still mixed. But it is also the case that a lot of Iraqis, having waded briefly into the horror of indiscriminate sectarian slaughter, have for the present made a conscious decision to step back.

The conflict between Shias and Shias has died down too. In the past few weeks Iraq's prime minister, Nuri al-Maliki, has belied a reputation for weakness by sending the army to take control of the port city of Basra and the Baghdad slum known as Sadr City, both strongholds until then of the powerful militia run by Muqtada al-Sadr, a vehemently anti-American Shia cleric. The fact that Mr Sadr considered it wise not to resist suggests not only that the army is now strong enough to out-face private militias but also that the state has acquired far greater political legitimacy, in Shia minds at least.

Needless to say, these conflicts could resume. The Sunnis fighting on America's side today could direct their fire back towards the Americans and Shias tomorrow if not enough room is made for them in the new, Shia-dominated order. On the Shia side, it is not clear whether Mr Sadr has given up violence for good. And his is not the only political movement to have a private army. Sunnis, Shias and Kurds alike still see their respective militias as a hedge against an uncertain future.

To that extent, Iraq is still far from normality. But if the calm survives, politics will at least have a chance. Mr Maliki's next job is therefore to go ahead with the provincial elections due before the end of the year. A good showing by the Sunnis, too few of whom voted in 2005, could bring them back into the political mainstream, enabling them to wield serious power in their own provinces at least. The elections can also provide a useful alternative path to power for the Sadrists, if they really have given up violence and decide to take part.

George Bush meanwhile has a further part to play, which consists mainly of not doing things that might tempt him. He should not, for example, attack Iran. One of the impressive things about Iraq's present government is its refusal to take sides between America and its next-door neighbour. It needs good relations with both if it is to prosper. Mr Bush has also to find a way to leave to his successor the business of negotiating a new agreement on the status of American forces in Iraq. This may become a toxic issue in Iraq's elections as the existing UN mandate expires. Mr Maliki is said to want a guarantee that America will defend its borders. His opponents accuse America of seeking permanent bases in Iraq, turning it into a vassal. It would be wrong for a lame duck in Washington to tie the hands of the next administration on such matters.

It's really not about that any more

In highlighting the improved conditions in Iraq we do not mean to justify The Economist's support of the invasion of 2003 (see article). Too many lives have been shattered for that. History will still record that the invasion and occupation have been a debacle. Iraqis even now live under daily threat of violent death: hundreds are killed each month. They remain woefully short of the necessities of life, such as jobs, clean water and electricity. Iraq's government is gaining confidence faster than competence. It is still fractious, and in many places corrupt.

Nor does it follow that a turn for the better necessarily validates John McCain's insistence on America staying indefinitely. A safer Iraq might make Barack Obama's plan to pull out most American troops within 16 months more feasible, though at the moment a precipitate withdrawal looks foolish. But to guard the fragile improvements, the key for America must be flexibility. Both candidates have to keep their options open. If America's next president gets Iraq wrong because he has boxed himself in during the campaign, all the recent gains may be squandered and Iraq will slide swiftly back into misery and despair. That would be to fail twice over.