The Libyan Prime Minister Mahmoud Jibril has confirmed that Colonel Muammar Gaddafi was killed on Thursday.
The former leader was shot when his home town of Sirte fell to National Transitional Council (NTC) fighters early in the morning.
Libyan people have been celebrating in the streets, firing guns into the air and setting off fireworks.
There has been fierce fighting in Sirte for several weeks, but the town has now fallen to NTC fighters.
British Prime Minister David Cameron said that he was proud of Britain's role in Gaddafi's downfall, and that it was a "day to remember all of Col Gaddafi's victims".
"People in Libya today have an even greater chance after this news of building themselves a strong and democratic future," he said.
Gaddafi was badly wounded in an attempt to capture him on Thursday morning and died shortly afterwards.
He was found by NTC fighters, hiding in a drainage pipe underground.
One of Col Gaddafi's sons, Mutasim, was also killed during the attack.
But another of Gaddafi's sons, Saif al-Islam, is thought to be still in hiding in the desert.
Gaddafi's long reign
Col Gaddafi ruled Libya for nearly 42 years after he took power from King Idris I, when he was just 27 years old.
That made him the leader who'd ruled the longest in the Arab world and in Africa.
In that time he ruled Libya brutally - people who disagreed with him have been dealt with ruthlessly, often imprisoned and sometimes killed.
What happens next?
The country now faces the task of rebuilding itself after months of civil war.
But there's hope.
Libya is a very rich country - one of the richest in Africa - because it has a huge amount of oil reserves.
It's also possible that tourism could take off there: it has many beautiful beaches bordering the Mediterranean Sea.
The temporary government, the National Transitional Council (NTC), wants to bring democracy to the country, introducing elections so that Libyans can choose who governs them.
But it could go another way: with Col Gaddafi gone, the people may no longer feel united by their hatred of their leader - and arguments could start between the politicians representing different groups.