Muammar Gadafy was killed today as Libya's new leaders declared they had overrun the last bastion of his long rule, sparking wild celebrations that the war may finally be over.
Senior officials in the interim government, which ended his 42-year rule two months ago but had laboured to subdue thousands of diehard loyalists, said his death would allow a declaration of "liberation" after eight months of bloodshed.
"We confirm that all the evils, plus Gadafy have vanished from this beloved country," prime minister Mahmoud Jibril said in Tripoli as the body was delivered, to Misrata, the city whose siege and suffering at the hands of Gadafy’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 tomorrow.
Mr Jibril, citing a forensic report, said tonight that Gadafy died from a bullet wound to the head received in crossfire between interim government fighters and his own supporters after he had been captured.
"Gadafy was taken out of a sewage pipe ... he didn't show any resistance. When we started moving him he was hit by a bullet in his right arm and when they put him in a truck he did not have any other injuries'," Mr Jibril told a news conference, reading from the forensic report.
"When the car was moving it was caught in crossfire between the revolutionaries and Gadafy forces in which he was hit by a bullet in the head. The forensic doctor could not tell if it came from the revolutionaries or from Gadafy's forces."
Gadafy was alive when he was taken from Sirte, but died a few minutes before reaching hospital, he added.
Western leaders, who had held off cautiously from comment until Jibril spoke, echoed his sentiments now that Gadafy, a self-styled "king of kings" in Africa whom they had lately courted after decades of enmity, was dead at 69.
British prime minister David Cameron, who with French president Nicolas Sarkozy was an early sponsor of February's revolt in Benghazi, said: "People in Libya today have an even greater chance after this news of building themselves a strong and democratic future."
President Barack Obama said the death of Gadafy marked the end of a "long and painful chapter" for the people of Libya and gives them the opportunity to determine their own destiny.
Today is a "momentous day" in Libyan history, Mr Obama said in remarks at the White House. Libya now must make the transition to a stable democracy, one that will take a "long and winding road," he added.
Nato urged Libyans to put aside their differences on Thursday after the killing of Gadafy and said it would coordinate an end to its military mission with the United Nations and Libya's transitional authority.
"After 42 years, Colonel Gadafy's rule of fear has finally come to an end," Nato secretary-general Anders Fogh Rasmussen said in a statement. "I call on all Libyans to put aside their differences and work together to build a brighter future."
The new national flag, resurrected by rebels who forced Gadafy from his capital Tripoli in August, filled streets and squares as jubilant crowds whooped for joy and fired in the air.
In Sirte, a one-time fishing village and Gadafy's home town that grandiose schemes had styled a new "capital of Africa", fighters danced, brandishing a golden pistol they said they had taken from Gadafy.
Accounts were hazy of his final hours, which also appeared to have cost the lives of senior aides. But top officials of the National Transitional Council, including Abdel Majid Mlegta, said he had died of wounds sustained in clashes.
One possible description, pieced together from various sources, suggests that Gadafy may have tried to break out of his final redoubt at dawn in a convoy of vehicles after weeks of dogged resistance. However, he was stopped by a Nato air strike and captured, possibly three or four hours later, after gun battles with NTC fighters who found him hiding in a drain.
Al Jazeera television showed images of Gadafy, apparently wounded but still alive when he was captured. He as shown being manhandled by a group of fighters and appearing to struggle against them at one point. He was shown with a bloodied face and being pushed against a car and being struck on the head by a pistol. Al Jazeera also broadcast separate footage of the body of a man who looked like Gadafy being dragged through the streets.
Nato said its warplanes fired on a convoy near Sirte this morning, striking two military vehicles in the group, but could not confirm that Gadafy had been a passenger.
One of Gadafy’s sons, Mo'tassim, has been killed by fighters from Libya's NTC while another, Saif al-Islam, is trying to flee the fallen city of Sirte but is being surrounded, a senior NTC military official said.
"Mo'tassim was killed by the fighters. He was trying to fight back and he was resisting them," National Transitional Council official Abdel Majid Mlegta said. "Saif al-Islam is trying to flee Sirte in a small convoy. Our fighters are encircling them.”
The NTC also said the head of Gadafy’s armed forces Abu Bakr Younus Jabr had been killed. Moussa Ibrahim, a cousin and adviser of the former dictator was also captured. Al Jazeera this afternoon broadcast pictures of the body of a man it identified as Jabr. The footage showed a bearded man with a bullet hole just below his neck.
There was no shortage of NTC fighters in Sirte claiming to have seen Gadafy die, though many accounts were conflicting. Libyan television carried video of two drainage pipes, about a metre across, where it said fighters had cornered a man who 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 Gadafy ground slowly across the country before a dramatic turn saw Tripoli fall in August.
An announcement of final liberation was expected as the chairman of the NTC prepared to address the nation of six million. They now face the challenge of turning oil wealth once monopolised by Gadafy and his clan into a democracy that can heal an array of tribal, ethnic and regional divisions he exploited.
The two months since the fall of Tripoli have tested the nerves of the motley alliance of anti- Gadafy forces and their Western and Arab backers, who had begun to question the ability of the NTC forces to root out regime loyalists in Sirte and a couple of other towns.
Gadafy, wanted by the International Criminal Court on charges of ordering the killing of civilians, was toppled by rebel forces on August 23rd, a week short of the 42nd anniversary of the military coup which brought him to power in 1969.
NTC fighters hoisted the red, black and green national flag above a large utilities building in the centre of a newly-captured Sirte neighbourhood and celebratory gunfire broke out among their ecstatic and relieved comrades.