Libya's new rulers have a momentous day ahead as they declare liberation, formally ending an eight-month-old civil war and ushering in a two-year transition to democracy fraught with uncertainty.

The liberation ceremony is set for the eastern city of Benghazi, the revolution's birthplace.

The victory has been clouded by questions over how the country's ousted dictator Muammar Qaddafi was killed after images emerged showing he was found alive and taunted and beaten by his captors.

The 69-year-old was captured alive Thursday, then taunted, beaten and killed in unclear circumstances in his hometown of Sirte. 

A doctor involved in an overnight autopsy on the former Libyan leader's body told Reuters Qaddafi died from a gunshot wound.

"He died because of a gunshot wound. It is obvious," the doctor said, giving no details about whether it was from an apparent gunshot wound on the left side of Gaddafi's head.

"There are still several issues. We have to pass (the report) to the prosecutor general. But everything will be revealed publicly. Nothing will be hidden."

The autopsy was carried out at a morgue in the city of Misrata, about 200 km 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 long-awaited declaration of liberation will come more than two months after revolutionary forces swept into Tripoli and seized control of most of the oil-rich North African nation. It was stalled by fierce resistance by Qaddafi loyalists in his hometown of Sirte, Bani Walid and pockets in the south.

Sirte was the last to fall, but Qaddafi's son and one-time heir apparent and many of his fighters have apparently escaped, raising fears they could continue to stir up trouble.

With Qaddafi gone, however, the governing National Transitional Council was moving forward with efforts to transform the country that was ruled by one man for more than four decades into a democracy.

In Tripoli, residents said they were relieved Qaddafi was killed, not captured, allowing the nation to move forward without fear that his supporters would try to sabotage the transition to democracy.

"If there was a trial, it would take some time. ... Maybe there would be revenge attacks," said Hosni Bashir, an oil worker who was attending the first meeting of a new political party in a Tripoli hotel. "Now, they (Libya's new leaders) can start."

Initially, NTC officials said the declaration of liberation would be made Saturday. But spokesman Abdel-Rahman Busin said preparations were under way for a Sunday ceremony.

The transitional leadership has said it would declare a new interim government within a month of liberation and elections for a constitutional assembly within eight months to be followed by a parliamentary and presidential vote within a year.

On Saturday, acting Prime Minister Mahmoud Jibril, who has said he plans to resign after liberation, said the interim government "should last until the first presidential elections."

Speaking at the World Economic Forum on the Jordanian shores of the Dead Sea, he also said the NTC must move quickly to disarm rebels who helped to overthrow Qaddafi's nearly 42-year-old regime. He said it was a priority to ensure huge caches of weapons are turned in over the "next few days."

Jibril also said the Libyan people must remember the agony of the past and choose a different path for the future. He said he was "relieved" after Qaddafi's ouster, describing it as a "great moment in my life."

Libyan authorities have argued about where to bury Qaddafi's remains. Abdel-Basit al-Mzirig, the deputy justice minister, said Qaddafi will be buried according to Islamic tradition, but his burial place will be kept secret.

Fighters from Misrata -- a city brutally besieged by regime forces during the civil war -- seemed to claim ownership of Qaddafi's body, forcing the delay of a planned burial Friday.

Fathi Bashagha, a spokesman for the Misrata military council, said the body of Qaddafi is in the custody of prosecutors .

International rights groups, including Amnesty International, called for a probe into the killing.

Men, women and children lined up to view Qaddafi's body, which was laid out on a mattress on the floor of an emptied-out vegetable freezer. The bodies of Qaddafi's son Muatassim and his ex-defense minister Abu Bakr Younis also were put on display Saturday, although they were covered with blankets so only their faces were visible.

The site's guards had even organized separate visiting hours for families and single men.

Qaddafi's bodyguard Mansour Dao also was captured during the battle. In a television interview aired on Al-Arabiya this week, he said the Libyan leader had been in Sirte since fleeing Tripoli as it was being overrun in late August.

Qaddafi's son Muatassim directed the battle, the bodyguard said, while the Libyan leader himself spent most of his time trying to evade capture by moving between apartments and homes that had been owned by supporters.

Dao described chaotic and desperate conditions, and said Qaddafi recorded speeches that were transmitted by Thuraya satellite phone. The convoy was struck by NATO warplanes as it was trying to flee to an area called Jaref, and revolutionary forces subsequently moved in on the survivors, he said.

"There were problems, they besieged us outside of District 2 and prevented us from going to Jaref," he told the pan-Arab station. "We got out on foot and the groups were divided ... I was in the group with Qaddafi, Abu Bakr Younis and his two sons."

Mohammed Misrati, a 45-year-old fighter in Misrata, said it was time to move past Qaddafi and take advantage of the country's natural resources.

"We need to look ahead and start building and developing," he said. "We deserve that after all of the struggle we had to go through and so the sacrifices won't go in vain."

Reuters contributed to this report.