After four days of often heated and fractious debate, a conference of more than 1,000 Iraqis has chosen an interim national assembly.
By Roger Hardy
BBC Middle East analyst
The 100-member assembly, which will start work next month, will act as a temporary parliament until elections due in January.
It finally emerged only after four days of debate, haggling and confusion - constantly overshadowed by the crisis in the southern city of Najaf.
Some delegates cried foul
Those who regard the process as a success insist that Iraq's early steps towards democracy were always bound to be hesitant.
The often heated debates, they say, are proof that free speech now reigns in a country only now emerging from more than three decades of tyranny.
Critics retort that the process was deeply flawed - and the outcome a far cry from the democracy they aspire to.
The Iraqis who gathered in Baghdad for the long-awaited national conference on 15 August certainly reflected some of the diversity of Iraqi society.
They included political, religious and tribal figures, members of the country's different ethnic and religious communities, technocrats and university professors, as well as women (with and without headscarves).
Competition for places at the conference had been keen.
The delegates' task was to choose 81 members of the new assembly. The remaining 19 seats had already been allotted to members of the now-defunct Iraqi Governing Council.
The assembly's role is essentially advisory - but given that the current interim government is unelected, it would do well to heed the assembly's advice
A quarter of the seats were reserved for women.
What some of the delegates did not realise was that the 81 would be chosen through a list system, rather than voted on individually.
Independents protested, claiming the country's main political parties had stitched up the result in advance.
In the end, they were allowed to draw up their own list, only to withdraw it at the last minute claiming they had been treated unfairly.
In something of an anti-climax, the list put forward by the conference organisers was approved without a vote.
Little guys come last
The idea of the national conference had been promoted by the UN special envoy Lakhdar Brahimi.
He had organised the loya jirga, or grand assembly, which chose the post-Taliban administration in Afghanistan.
The clear aim was to show, in the absence of elections, that a political process was under way with a degree of popular participation.
In the event, UN officials in Baghdad quietly distanced themselves from the result. They had given advice, they said, but it had not been their show.
The assembly, like the current interim government and before it the Iraqi Governing Council, is dominated by the political parties which, mostly from exile, formed the opposition to the Saddam Hussein regime.
Smaller parties and independents are feeling squeezed out.
The assembly will not be a fully-fledged parliament.
It will not be able to pass laws, though a two-thirds majority will have the power to veto government legislation.
The assembly will be asked to approve the national budget, and it will appoint a prime minister or a president if either of them dies or leaves office.
Its role is essentially advisory.
But given that the current interim government is unelected, it would do well to heed the assembly's advice.
The lesson of the last few days is that, while Iraqis appear to relish their new-found freedoms, the emergence of a new and credible political leadership will be neither quick nor easy.