End of an era ... Muammar Gaddafi is dead. Photo: ReutersThe killing or capture of Gaddafi's senior aides, including possibly two of his sons, as an armoured convoy braved NATO air strikes in a desperate bid to break out of Sirte, might ease fears of diehards regrouping elsewhere.
However, mobile phone video apparently of Gaddafi alive and being beaten might inflame his sympathisers.
A Libyan official said Gaddafi, 69, was killed in custody.
Libyan National Transitional Council fighters hold what they claim to be the gold-plated gun of the late Libyan leader. Photo: AFP"We confirm that all the evils, plus Gaddafi, have vanished from this beloved country," interim Prime Minister Mahmoud Jibril said in Tripoli as the body was delivered, a prize of war, to Misrata, the city whose siege and suffering at the hands of Gaddafi's forces made it a symbol of the rebel cause.
"It's time to start a new Libya, a united Libya," Mr Jibril added. "One people, one future."
A formal declaration of liberation, that will set the clock ticking on a timeline to elections, would be made by Friday, he said.
Gaddafi dead ... Libyans celebrate at Martyrs Square in Tripoli. Photo: ReutersShot in head
A spokesman for the National Transitional Council (NTC) in Benghazi, Jalal al-Galal, said a doctor who examined Gaddafi in Misrata found he had been shot in the head and abdomen. Jerky video shown on al-Jazeera showed a man looking like Gaddafi, with distinctive long, curly hair, bloodied and staggering under blows from armed men, apparently NTC fighters.
"They captured him alive and while he was being taken away, they beat him and then they killed," one senior source in the NTC told Reuters. "He might have been resisting."
Last stand ... an anti-Gaddafi fighter points at the drain where Muammar Gaddafi was reportedly hiding before he was captured. Photo: ReutersDriven in an ambulance from Sirte, his partially stripped body was delivered to a mosque in Misrata. Senior NTC official Abdel Majid Mlegta told Reuters that DNA tests were being conducted to confirm it was Gaddafi. He would be buried in Misrata, most likely by Friday according to Muslim custom.
Officials said his son Mutasin, also seen bleeding but alive in a video, had also died. Another son, heir-apparent Seif al-Islam, was variously reported to have surrounded, been captured or killed as conflicting accounts of the day's events crackled around networks of NTC fighters rejoicing in Sirte.
In Benghazi, where in February Gaddafi disdainfully said he would hunt down the "rats" who had emulated their Tunisian and Egyptian neighbours by rising up against an unloved autocrat, thousands took to the streets, firing their weapons and dancing under the old tricolour flag revived by Gaddafi's opponents.
Jubilation .... anti-Gaddafi fighters celebrate the fall of Sirte. Photo: ReutersMansour el Ferjani, 49, a Benghazi bank clerk and father of five posed for a photograph holding a Kalashnikov rifle. "Don't think I will give this gun to my son," he said. "Now that the war is over we must give up our weapons and the children must go to school.
"But Gaddafi was a terrible dictator and this was the only way to get rid of him. We want everything people have in free countries - we want people to live in peace as you do across the Mediterranean where life doesn't require the machinegun."
In Sirte, a one-time fishing village and Gaddafi's home town in which grandiose schemes had styled a new "capital of Africa" for the "king of kings", fighters whooped with delight and some brandished a golden pistol they said they had taken from Gaddafi.
Bloody end ... in this still image provided by Reuters TV, a man believed to be Muammar Gaddafi, is pulled from a truck by NTC fighters in Sirte. Photo: ReutersAccounts were hazy of his final hours, though there was no shortage of fighters willing to claim they saw Gaddafi, who had long pledged to go down fighting, cringing underground, like Saddam Hussein eight years ago, and pleading for his life.
One possible description, pieced together from various sources, suggests Gaddafi tried to break out of his final place of refuge at dawn in a convoy of vehicles after weeks of dogged resistance.
Killed in Sirte ... Muammar Gaddafi. Photo: Getty ImagesHowever, he was stopped by a French air strike and captured, possibly some hours later, after gun battles with NTC fighters who found him hiding in a drainage culvert.
NTC fighters were seen waving a gold-plated gun, which they said belonged to Gaddafi.
NATO said its warplanes fired on a convoy near Sirte about 8.30am, striking two military vehicles in the group, but could not confirm that Gaddafi had been a passenger. France later said its jets had been in action at the time.
Muammar Gaddafi, pictured in 1977 with then Cuba Leader Fidel Castro. Photo: APLibyan television carried video of two drainage pipes, about a metre across, where it said fighters had cornered the man who had long inspired both fear and admiration around the world.
After February's uprising in the long discontented east of the country around Benghazi - inspired by the Arab Spring movements that overthrew the leaders of neighbouring Tunisia and Egypt - the revolt against Gaddafi ground slowly across the country before Tripoli fell dramatically in August.
People celebrate outside the Libyan embassy in Knightsbridge, London. Photo: Getty ImagesThe NTC now faces the challenge of turning Libya into a democracy that can heal an array of tribal, ethnic and regional divisions Gaddafi exploited.
The two months since the fall of Tripoli have tested the nerves of the motley alliance of anti-Gaddafi forces and their Western and Arab backers, who had begun to question the ability of the NTC forces to root out diehard Gaddafi loyalists in Sirte and a couple of other towns.
Gaddafi, wanted by the International Criminal Court on charges of ordering the killing of civilians, was toppled by rebel forces on August 23, a week short of the 42nd anniversary of the military coup that brought him to power in 1969.
Ruled with an iron fist ... Muammar Gaddafi. Photo: ReutersHundreds of NTC troops had surrounded Sirte for weeks in a chaotic struggle that killed and wounded scores of the besieging forces and an unknown number of defenders.
"There is now this massive expectation. Up to now they've had an excuse that they are running a war. They don't have that now ... Everything now has got to happen," John Hamilton, a Libya expert at Cross Border Information, told Reuters.
"That's a hard task. They have to deliver for the people. On the other hand, this may renew the honeymoon they enjoyed when Tripoli fell, if they can put a decent government together in a short time."
Taking credit ... US President Barack Obama. Photo: ReutersSome fear instability may linger and unsettle that process.
"Gaddafi is now a martyr and thus can become the rallying point for irredentist or tribal violence - perhaps not in the immediate future but in the medium to long term," said George Joffe, a north Africa expert at Cambridge University.
"The fact that NATO can be blamed for his death is worrying, in terms of regional support, and may undermine the legitimacy of the National Transitional Council."