Libyan rebels have seized control of most of Tripoli in a lightning advance.
Colonel Muammar Gaddafi's defenders quickly melted away as his 42-year rule crumbled, but the leader's whereabouts were unknown and pockets of resistance remained.
"It's over, frizz-head," chanted hundreds of jubilant people, using a mocking nickname for the curly-haired Gaddafi.
The revellers fired shots in the air, clapped and waved the rebels' tricolour flag. Some set fire to the green flag of Gaddafi's regime and shot holes in a poster with the leader's image.
Opposition fighters captured Gaddafi's son and one-time heir apparent, Seif al-Islam, who along with his father faces charges of crimes against humanity. Another son was under house arrest.
The startling breakthrough, after a long deadlock in Libya's six-month-old civil war, was the culmination of a closely coordinated plan by rebels, NATO and anti-Gaddafi residents inside Tripoli, rebel leaders said.
Rebel fighters from the west swept over 20 miles in a matter of hours yesterday, taking town after town and overwhelming a major military base as residents poured out to cheer them. At the same time, Tripoli residents secretly armed by rebels rose up.
When rebels reached Tripoli, the battalion entrusted by Gaddafi with guarding the capital surrendered.
Its commander, whose brother had been executed by Gaddafi years ago, was secretly loyal to the rebellion, a senior rebel official said.
US President Barack Obama said Libya is "slipping from the grasp of a tyrant" and urged Gaddafi to relinquish power.
"The future of Libya is now in the hands of the Libyan people," Obama said in a statement.
By the early hours of this morning, opposition fighters controlled most of the capital.
Abdel-Hakim Shugafa, a 26-year-old rebel fighter, said he was stunned by how easy it was.
He saw only about 20 minutes of gun-battles as he and his fellow fighters pushed into the capital at nightfall.
"Now we can build a better Libya," he said.
In a series of angry and defiant audio messages broadcast on state TV, Gaddafi called on his supporters to march in the streets of the capital and "purify it" of "the rats."
Government spokesman Moussa Ibrahim claimed the regime has "thousands and thousands of fighters" and vowed: "We will fight. We have whole cities on our sides. They are coming en masse to protect Tripoli to join the fight."
But it seemed that significant parts of Gaddafi's regime and military were abandoning him. His prime minister, Al-Baghdadi Al-Mahmoudi, fled to a hotel in the Tunisian city of Djerba, said Guma el-Gamaty, a London-based rebel spokesman.
NATO Secretary-General Anders Fogh Rasmussen said Gaddafi's regime was "clearly crumbling".
Thousands celebrated in the streets of Benghazi, the rebels' de facto capital hundreds of miles to the east. Firing guns into the air and shooting fireworks, they cheered and waved the rebel tricolour flags, dancing and singing in the city's main square.