Iraq's national elections were some distance removed from the type of poll associated with a smoothly functioning democracy. They were conducted amid an intimidating campaign of violence, and in the aftermath there have been accusations of fraud.
Even now, only partial results are available because of disorderly vote-counting. Yet the pluses of the election far outweigh the negatives, especially in indicating that Iraq may be ready to turn its back on years of sectarian strife.
The results announced so far show the Prime Minister, Nouri Maliki, edging ahead. His State of Law coalition leads in seven of the country's 18 provinces.
That is two ahead of his main rival, the secular Iraqiya bloc led by a former Prime Minister, Ayad Allawi. Trailing in their wake are hardline religious parties, which have been a dominant influence in Iraq since the American invasion in 2003.
The Iraq National Alliance, the main Shiite religious bloc, which includes a party led by anti-American cleric Muqtada al-Sadr and is closely tied to Iran, will have a slender presence in the new Parliament.
The bloc that wins the most seats will be asked to form a new government. If this falls to Mr Maliki, it will be no easy task. While a moderate, he has alienated figures on all side of the political spectrum during his four years in office.
Even the added security he has brought to Iraq has proved no counter to this political maladroitness.
Ideally, Mr Maliki's coalition partner would be Mr Allawi. A Shiite, he has attracted the vote of many of the minority Sunni community, who believe he would represent their interests and not be beholden to Iran.
But there is a major rift between the two men. Mr Allawi says the Prime Minister has not done enough to boost goodwill among Iraq's factions.
The split widened after a government-ordered ballot purge of more than 440 candidates, which was widely seen as targeting Iraqiya and undermining its chances.
Mr Maliki's other major coalition option is the Iraq National Alliance. That would be a cause of concern if it were the harbinger of closer relations with Tehran.
However, Mr Maliki has gone to considerable lengths to establish himself as a non-sectarian nationalist, and to put distance between himself and Iran.
If he can form a government and, indeed, manages to remain Prime Minister, he could be expected to continue to steer a moderate course.
That would be in keeping with the wish of most of the 62 per cent of Iraqis who voted in this election, just the second parliamentary poll since the American invasion.
For the first time, the Sunni community, which produced, and benefited from, the rule of Saddam Hussein, voted in large numbers.
Sunnis boycotted the 2005 election, setting the scene for a three-year sectarian war that ended in victory for the Shiite militias. They cast votes this time in the belief it was their best chance of having a say in government.
Already, Mr Maliki has started negotiations to form a new administration. That may appear premature, given votes are still being counted.
But it is important there is no repeat of the six-month hiatus after the 2005 election. During this time, the insurgency erupted. The sectarian divisions remain, and the Sunnis will again be resentful if it appears they are going to be denied government jobs and a role in security.
If a coalition is cobbled together relatively quickly, it will clear the way for the smooth pull-out of more American troops by the end of August, and a final exit by the end of next year.
The new government will have its hands full preserving Iraq's fragile security, continuing to resolve its sectarian tensions and repairing shattered public services.
But, at the very least, this election marks a promising start. Iraq has defied the many doomsayers by moving further along the road to democracy and reconciliation.