By Rania El Gamal and Tim Gaynor
MISRATA, Libya, Oct 22 (Reuters) - Muammar Gaddafi's body lay still unburied as Libya's new men of power wrangled over its fate and a formal announcement the war was over, a move the outgoing premier said on Saturday should mean free elections in the middle of next year.
Mahmoud Jibril, an expatriate academic who has been prime minister in the Western-backed rebel government, confirmed he was stepping down and that the coming days would be a critical test of how the new leadership and Libya's six million people could handle their freedom after 42 years at Gaddafi's whim.
In Misrata, the once besieged city whose rebel fighters are pushing claims for a big stake in a "reborn", oil-rich Libya, they guarded the market cold store where, for a second day, the curious and the relieved filed in to view the fallen strongman, whose surprise capture and killing in his home town of Sirte on Thursday sparked joy -- and renewed jockeying for influence.
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. Officials with the National Transitional Council (NTC) said they were trying to arrange a secret resting place that would avoid loyalist supporters making it a shrine.
In Benghazi, Libya's second city and seat of the revolt in February, leaders were preparing a formal declaration on Sunday that the whole country was "liberated", a move that starts the clock ticking on a plan to install a transitional government, draft a constitution and institute full democracy by 2013.
The announcement has been expected, and delayed, since Thursday, amid arguments over whether Benghazi or the capital Tripoli, captured in August, should have the honour.
Anarchy has been a defining characteristic of the disparate movement that fought Gaddafi for eight months across vast tracts of desert and Jibril, criticised by some in the anti-Gaddafi forces, made clear at an international business conference in Jordan that progress would require great resolution:
"First, what kind of resolve the NTC will show in the next few days," he said. "And the other thing depends mainly on the Libyan people - whether they differentiate between the past and the future ... I am counting on them to look ahead and remember the kind of agony they went through in the last 42 years."
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 may thrive, as well as differences between Islamists and secularists and ethnic tensions between Arabs and Berbers.
"THE CAKE IS NOW"
In Misrata, where Gaddafi's body lay, bearing bullet wounds that many assume were inflicted by fighters from the city who found him hiding in a storm drain, 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.
"There is going to be regional in-fighting. You have Zintan and Misrata on one side and then Benghazi and the east ... There is in-fighting even inside the army.
"The cake is now and everybody wants to take a piece."
For Misratans, 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. Fighters had previously brought back statues and other emblems of Gaddafi's rule, seized from Tripoli.
Jibril, who said he planned to step down as previously announced now that fighting was over, described Gaddafi's death as leaving him feeling personally "relieved and reborn".
Libya now needed a vision to unite people behind and to diversify the economy away from oil and gas exports: "We need to seize this very limited opportunity," he said. "We should use this time properly to build an alternate economy as fast as possible."
Gaddafi's family and international human rights groups have urged a inquiry into how Gaddafi, 69, was killed, when gory cellphone video footage showed him alive but being beaten and taunted by his captors on Thursday. Jibril said on the day that Gaddafi was killed in "crossfire" when his supporters opened fire on the ambulance that was taking him to hospital.
But an ambulance driver in Sirte told Reuters that the former leader was already dead by the time he picked him up.
His death marked the end of what might have been another Arab dynasty, although his son and heir-apparent Saif al-Islam was still at large. NTC officials believe he escaped from Sirte.
Despite the qualms of some abroad, few Libyans are prepared to spare much of a thought for how Gaddafi met his end.
But some 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.
One senior figure among the fighters in Misrata told Reuters that he was ashamed of the way one man broke the news of his death to Gaddafi's own daughter, Aisha, who happened to call on a satellite phone that was found when he died.
"Aisha called and one of the revolutionaries answered her," the commander said. "He said: 'It's over. Abu Shafshufa died'."
Using a nickname derived from Gaddafi's distinctive long ringlets - approximately 'Old Fuzzhead' - had been an affront to decency, he added: "It's shameful. It is his 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.
In a statement on a Syria-based pro-Gaddafi television station, the ousted dictator's family asked for the bodies of Gaddafi, his son Mo'tassim, and others: "We call on the UN, the Organisation of the Islamic Conference and Amnesty International to force the Transitional Council to hand over the martyrs' bodies to our tribe in Sirte and to allow them to perform their burial ceremony in accordance with Islamic customs and rules," the statement said.
At an understated and thinly attended news conference late on Friday, NATO Secretary-General Anders Fogh Rasmussen said the Western alliance had taken a preliminary decision to call a halt to Operation Unified Protector on Oct. 31.
Like other Western officials, Rasmussen expressed no regrets in public about the gruesome death of the deposed Libyan dictator, who was captured alive by the forces of the National Transitional Council but was brought dead to a hospital.
"We mounted a complex operation with unprecedented speed and conducted it with the greatest of care," Rasmussen said. "I'm very proud of what we have achieved."
The NATO operation, officially intended to protect civilians, effectively ended on Thursday with French warplanes blasting Gaddafi's convoy as he and others tried to escape. (Additional reporting by Taha Zargoun and Tim Gaynor in Sirte, Barry Malone, Yasmine Saleh and Jessica Donati in Tripoli, Brian Rohan in Benghazi, Jon Hemming and Andrew Hammond in Tunis, Samia Nakhoul in Amman, Christian Lowe in Algiers, Tom Pfeiffer at Dead Sea,