Benghazi: Racing to fill a power vacuum and prevent a descent into lawlessness, Libya is to proclaim its war over on Sunday and start building the ballot box democracy Muammar Gaddafi once saw as fit for "donkeys".
Tens of thousands who before this year's revolt had known nothing but Gaddafi's all-powerful police state are due to pack a square in the second city Benghazi to hear interim government leader Mustafa Abdel Jalil announce the "liberation" of Libya.
The announcement was expected at about 1400 GMT.
With big oil and gas resources and a relatively small population, Libya has the potential to become prosperous.
But some fear Jalil will struggle to impose his will on his heavily armed but fragmenting revolutionary alliance, pointing to the insistence of fighters in the provincial town of Misrata on continuing to display the body of the former strongman three days after his death, in apparent breach of Islamic practice.
And there is international disquiet about increasingly graphic and disturbing images on the Internet of abuse of a body that appears to be Gaddafi's following his capture and the fall of his hometown of Sirte on Thursday.
"There is a yawning security and political vacuum in which brewing political disputes, factionalism and security problems pose a serious risk of derailing or prolonging transition," said Henry Wilkinson of Janusian security consultants in London.
With big oil and gas resources and a relatively small population of six million, Libya has the potential to become prosperous, but regional rivalries fostered by Gaddafi could erupt into yet more violence that would undermine the authority of Jalil's National Transitional Council (NTC).
In Misrata, people queueing up for a chance to see Gaddafi's body saw no reason for a rapid burial, apparently heedless of concern in Tripoli about how the NTC is perceived overseas.
"This guy is not a Muslim. If he was a Muslim we would have treated him in an Islamic way," a man who gave his name as Suleiman told Reuters.
"We brought our children to see him today because this is a chance to see history," another visitor, Mohammed, said.
"We want to see this arrogant person as a lifeless body. Let all the people see him."
Jalil's speech is intended to set the clock ticking on a process to set up a multiparty democracy, a system Gaddafi railed against for most of his 42 years in power.
In 2007 Gaddafi, whose "state of the masses" was seen by many Libyans as despotism, said democracy was a sham in which people were "ridden like donkeys" by powerful interests.
But some analysts fear that without strong leadership the revolution could now collapse into armed infighting, preventing the country from ever attempting the novelty of the ballot box.
The lack of a clear plan for Gaddafi's burial suggests to some analysts that there is justification for fears of a descent into leaderless turmoil.
But an autopsy has been performed, and a medical source told Reuters that Gaddafi's body had a bullet in the head and a bullet in the abdomen.
"There are multiple injuries. There is a bullet in the abdomen and in the brain," the medical source said.
The autopsy was carried out at a morgue in Misrata, about 200 km (130 miles) east of Tripoli. Local officials said Gaddafi's body would now be brought back to the cold store at an old market in Misrata where it has been on public display.
The loosely disciplined militias that sprang up in each town to topple the dictator with the help of NATO air power are still armed. The places they represent will want a greater say in the country's future, particularly the second and third cities Benghazi and Misrata which were starved of investment by Gaddafi.
It was fighters from Misrata who emerged from a lengthy and bloody siege to play a large part in taking Tripoli and later caught Gaddafi, cowering in a drainage pipe outside Sirte.
Libya's new leaders have a "very limited opportunity" to set aside differences, said interim prime minister Mahmoud Jibril as he announced he was stepping down on Saturday.
Jibril said progress for Libya would need great resolution, both by interim leaders on the National Transitional Council and by six million war-weary people.
But a field commander in Misrata worried that trouble was brewing.
"The fear now is what is going to happen next," he said, speaking to Reuters privately, as ordinary Libyans, some taking pictures for family albums, filed in under armed guard to see for themselves that the man they feared was truly dead.
"There is going to be regional in-fighting. You have Zintan and Misrata on one side and then Benghazi and the east," the guerrilla said. "There is in-fighting even inside the army."
There is some unease abroad over what many believe was a summary execution of Gaddafi. U.N. Human Rights Commissioner Navi Pillay has called for an investigation into the killing, but very few Libyans share those concerns.
Arguments have arisen among Libya's factions about what to do with the corpse which has not been accorded the swift burial required by Islamic law and is beginning to decompose. Those viewing the body on Saturday were obliged to cover their faces with surgical masks.
Gaddafi's surviving family, in exile, wants his body and that of his son Mo'tassim to be handed over to tribal kinsmen from Sirte. NTC officials said they were trying to arrange a secret resting place to avoid loyalist supporters making it a shrine. Misrata does not want his body under its soil.
The disputes within the NTC have delayed the announcement of an end to the war several times, but such worries are unlikely to be paramount in the minds of many Libyans as they celebrate the beginning of a new era in their country's history.
The announcement will set a clock ticking on a plan for a new government and constitutional assembly leading to full democracy in 2013.
"We hope we will have an elected democratic government with broad participation," student Ali Abu Shufa said.
Gaddafi promoted tribalism to keep the country divided, he said. "But now Gaddafi is dead, all the tribes will be united."