Libya's ex-leader Col Muammar Gaddafi has been killed after an assault on his birthplace of Sirte, officials say.
Acting Prime Minister Mahmoud Jibril announced the death, and later said the colonel had been killed in a crossfire between Gaddafi loyalists and fighters from the transitional authorities.
He confirmed that Col Gaddafi had been taken alive, but died of bullet wounds minutes before reaching hospital.
Video footage suggests he was also dragged through the streets.
It is unclear from the footage, broadcast by al-Jazeera TV, whether he was alive or dead at the time.
US President Barack Obama said it was a "momentous day" for Libya, now that tyranny had fallen.
He said the country had a "long and winding road towards full democracy", but the US and other countries would stand behind Tripoli.
Col Gaddafi was toppled from power in August after 42 years in charge of the country.
He was fighting his last stand in Sirte alongside two of his sons, Mutassim and Saif al-Islam, according to reports.
Acting Justice Minister Mohammad al-Alagi told the AP news agency Saif al-Islam had been captured and taken to hospital with a leg wound.
A corpse that officials identified as that of Mutassim has been laid out in a house in the city of Misrata, where locals have been queuing to take pictures.
The body of Col Gaddafi has also reportedly been taken to Misrata.
Nato, which has been running a bombing campaign in Libya for months, said it had carried out an air strike earlier on Thursday.
French Defence Minister Gerard Longuet said French jets had fired warning shots to halt a convoy carrying Col Gaddafi as it tried to flee Sirte.
He said Libyan fighters had then descended and taken the colonel.
Proof of Col Gaddafi's fate came in grainy pieces of video, first circulated among fighters, and then broadcast by international news channels.
The first images showed a bloodied figure presumed to be Col Gaddafi.
Later, video emerged of the colonel being bundled on to the back of a pick-up truck after being captured alive.
None of the video footage has been independently verified.
Mr Jibril, number two in the National Transitional Council (NTC), held a news conference in Tripoli to confirm the colonel's death.
"We have been waiting for this moment for a long time. Muammar Gaddafi has been killed," he said.
Later, he told journalists that a "forensic report" had concluded that the colonel had died from bullet wounds after he had been captured and driven away.
"When the car was moving it was caught in crossfire between the revolutionaries and Gaddafi forces in which he was hit by a bullet in the head," said Mr Jibril, quoting from the report.
"The forensic doctor could not tell if it came from the revolutionaries or from Gaddafi's forces."
Earlier, some NTC fighters gave a different account of the colonel's death, saying he had been shot when he tried to escape.
One NTC fighter told the BBC that he found Col Gaddafi hiding in a hole, and the former leader had begged him not to shoot.
The fighter showed reporters a golden pistol he said he had taken from Col Gaddafi.
Arabic TV channels showed images of troops surrounding two large drainage pipes where the reporters said Col Gaddafi was found.
'Full of challenges'
Libyans gathered in towns and cities across the country to celebrate the reports of the colonel's death.
Groups of young men fired guns in the air, and drivers honked horns in celebration.
His death came after weeks of fierce fighting for Sirte, one of the last remaining pockets of resistance.
World leaders urged the NTC to carry through its promise to reform the country.
UK Prime Minister David Cameron, who had taken a leading role in Nato's intervention, said it was "a day to remember all of Col Gaddafi's victims".
UN Secretary General Ban Ki-moon called it a "historic" moment, but warned: "The road ahead for Libya and its people will be difficult and full of challenges."
Officials said the NTC intended to announce the "liberation of the country" in the coming days, allowing them to begin pushing through democratic reforms that will lead to elections.