As Muammar Gaddafi lay still unburied, Libya's outgoing premier said the coming days posed a crucial test of resolve for the new men of power, who are wrangling over the body, and about a formal end to the war.

Mahmoud Jibril confirmed he would step down on Saturday after seven months as prime minister of the Western-backed rebel government now that the legal declaration of liberation was expected on Sunday following Gaddafi's killing on Thursday.

But in a parting shot from an international business forum in Jordan, the former expatriate academic who has many critics in the motley coalition that ousted Gaddafi two months ago, warned that now was not a time for in-fighting if Libyans were to keep to a plan to hold their first free election next year.

Leaders required resolve, he said, in the next few days.

In Misrata, the once besieged city whose rebel fighters are pushing claims for a big stake in a reborn, oil-rich Libya, the curious and the relieved filed for a second day through a market cold store to view the fallen strongman, whose surprise capture and killing in his home town of Sirte sparked joy - and renewed jockeying for influence - across the country.

Visitors wore surgical masks against the stench, an image that may trouble some Muslims, for whom swift burial is a holy duty - even if few Libyans share unease among their Western allies over what seems increasingly likely to have been a summary execution of the former leader by his Misratan captors.

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: First, he said, What kind of resolve the NTC will show in the next few days.

And the other thing depends mainly on the Libyan people - whether they differentiate between the past and the future.

Urging a vision to diversify the economy away from oil, and a rejection of exploiting energy contracts for political ends, he added: I am counting on them to look ahead and remember the kind of agony they went through in the last 42 years.

He said: We need to seize this very limited opportunity.

LIBERATION

The formal declaration of an end to eight months of war and of liberation from four decades of living at the whim of Colonel Gaddafi was expected to be made by NTC chairman Mustafa Abdel Jalil on Sunday in the eastern city of Benghazi, the seat of the revolt which was inspired by the fall of Arab autocrats in neighbouring Tunisia and Egypt.

But amid regional rivalries for honours from Tripoli, the capital which fell in August, and from the third city, Misrata, whose long siege has made it a symbol of resistance, there have been several delays in the announcement. It will set a clock ticking on a plan for a new government and constitutional assembly leading to full democracy in 2013.

Jibril reaffirmed the plan was for elections to the body that will draft a constitution to be held in eight months.

For now, though, there is little sign of an end to the anarchic energy that is a defining characteristic of the disparate, grass-roots rebel movement that has brawled with Gaddafi's better armed forces for eight months across vast tracts of desert, helped by NATO air strikes.

In Misrata, where Gaddafi's body lay, bearing bullet wounds that many assume were inflicted by fighters from the city who hauled him from a storm drain in his home town of Sirte, one field commander voiced his concern 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 historic 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.

The cake is now, and everybody wants a piece.

DIVISIONS

For some, there are encouraging signs, notably that the two-month gap between the fall of Tripoli and the death of Gaddafi has not seen fighting between different factions. Comparisons with Iraq after Saddam Hussein are tempered by the absence of the sectarian divide which has ravaged that country.

However, as in Iraq, there are vast energy resources at stake and a host of international powers keen to exploit them.

In a thinly populated country that was only united in the 1930s under Italian colonial rule, regional enmities thrive, as well as differences between Islamists and secularists and among those who once served Gaddafi - like NTC head Abdel Jalil - and others. There is also ethnic tension between Arabs and Berbers.

For Misratans in particular, who endured months of bloody siege but fought off Gaddafi's army and played an important role in taking Tripoli, the body of the fallen strongman is only the latest trophy of war to be brought back to the city.

Gaddafi's surviving family, in exile, have asked that his body, and that of his son Mo'tassim, 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. A tribal burial would echo the fate of Saddam and his sons, though their graves are known.

Unlike on Friday, Gaddafi's body was covered by a blanket that left only his head exposed, hiding bruises on his torso and scratch marks on his chest that had earlier been visible.

Crucially, a Reuters reporter who viewed the body said, Gaddafi's head had been turned to the left. That meant a bullet hole that earlier could be seen on the left side of his face, just in front of his ear, could no longer be seen.

SUMMARY EXECUTION?

Gaddafi's family and international human rights groups have urged an inquiry into how Gaddafi, 69, was killed, since gory cellphone video footage showed him alive but being beaten and taunted by his captors. Jibril said on the day that Gaddafi was killed in crossfire in an ambulance taking him to hospital.

But an ambulance driver in Sirte told Reuters Gaddafi was already dead by the time he picked him up, and a local military commander in Misrata said over-enthusiastic fighters had taken matters into their own hands:

We wanted to keep him alive. But the young guys..., he told Reuters. Things went out of control.

The International Criminal Court at The Hague had wanted to try Gaddafi for war crimes and may yet be able to try his son Saif al-Islam if he is found. NTC officials believe he escaped from the last redoubt in Sirte, after French jets had scattered a convoy of dozens of vehicles trying to flee with his father.

Intelligence chief Abdullah al-Senussi, the third man wanted by the ICC, managed to reach Niger, officials have said.

Libyans also want to try some of the old guard at home.

Despite the qualms of some abroad, few compatriots spare much of a thought for how Gaddafi met a bloody end that was captured, in random snatches, in clips of cellphone video broadcast around the world while Libyans rejoiced.

People in the West don't understand the agony and pain that the people went through during the past 42 years, said Jibril, who added he felt reborn when he heard the news.

Abdulatif, a pilot, who came to see the body in Misrata, asked: What would he tell the mother whose children were killed or the girls who were raped? If he lived and was killed a thousand times that would still only be a trifle.

Hassen al-Setini, 32, said the ICC would have been too lenient: It is better that he died ... If he stayed alive to be tried, his supporters would continue fighting.

Nonetheless, some Libyans have expressed unease at the way his body has been treated - Muslim custom dictates it should have been buried by sundown on Thursday - and at other aspects that touch on matters of religion and respect for the dead.

Gaddafi's daughter Aisha, her mother and two of her brothers fled to Algeria after the fall of Tripoli. Aisha gave birth on the day she arrived. The government in Algiers angered the NTC by refusing to send them back. But an Algerian newspaper on Saturday quoted official sources saying that, following the death of the head of the family, they might now reconsider.