Libyan rebels surged into Tripoli in a final drive to oust Moamer Kadhafi, seizing swathes of the capital including symbolic Green Square and arresting the strongman's son, Seif al-Islam.
Thousands of residents poured onto the streets to welcome the rebels, congregating at the site which they renamed Martyrs Square near the water front in the centre of Tripoli.
Sky News showed scenes of jubilant crowds gathered there, many waving the red, black and green flag of anti-regime forces, dancing in joy and shouting Allahu Akbar (God is greatest). Some fired rifles into the air.
As many of the men flashed V-for-victory signs and shouted "tell Moamer (Kadhafi) and his sons that Libya has men," a Sky correspondent said people were lighting fires with posters of the Libyan strongman and the solid green flag of the regime that they had torn down.
Similar scenes of jubilation were witnessed in Benghazi, the rebels' bastion in the east, where delirious residents danced and proclaimed the end of the regime of the "tyrant" Kadhafi.
The strongman vowed not to surrender, even as NATO said his regime was crumbling and Britain predicted "the end was near" for the 69-year-old leader, who has kept a tight grip on power in his oil-rich North African nation for almost 42 years.
As the rebels boasted they would take full control of Tripoli during the night, Kadhafi issued his third message of the day, urging the people of Tripoli to "purge the capital."
Libyan government spokesman Mussa Ibrahim told a press conference that 1,300 people have been killed in the rebel assault on the capital, describing the fighting as a "real tragedy."
But there was no independent confirmation of the casualty toll, nor any immediate indication of how much resistance may have been put up against the rebels' entry into the capital.
Ibrahim insisted that Libya's regime "is still strong and thousands of volunteers and soldiers are ready to fight" although the reality on the ground seemed to belie his boasts.
In The Hague, the International Criminal Court's prosecutor confirmed that Kadhafi's son Seif al-Islam, for whom the ICC had issued arrest warrants for crimes against humanity, is in detention.
"I have received confidential information stating he has been arrested," Luis Moreno-Ocampo told AFP.
"We hope he can soon be in the Hague" to face justice, he said, adding that he planned to contact the "Libyan transitional government" later in the day.
Moreno-Ocampo said the ICC "is ready to help Libyans to deal with their difficult past" and ensure that "no crime remains unpunished".
Earlier, the chairman of Libya's rebel National Transitional Council (NTC) told Al-Jazeera television from Benghazi he had "information that Seif al-Islam has been captured".
"He is being kept in a secure place under close guard until he is handed over to the judiciary," Mustafa Abdel Jalil said, without say when or where Kadhafi's son had been captured.
Describing their surprise assault, rebel leaders said an advance party of fighters had arrived by sea in the capital early Sunday and joined sleeper cells of rebels to launch the final drive, codenamed "Mermaid."
Signup to our newsletter and follow us on Facebook and Twitter!
Another rebel force advanced on the capital from the west, moving in a convoy of around 100 vehicles as onlookers fired celebratory gunfire into the air, an AFP correspondent said.
By afternoon they had overrun the eastern suburb of Tajura and boasted that they would seize control of the capital during the night.
It was still not clear how much of the capital the rebels had seized, but it appeared they had taken over the headquarters of the Libyana mobile telephone company, located in Tajura.
Libyana clients received a message on their mobiles from the NTC "congratulating the Libyan people for the fall of Moamer Kadhafi."
At the same time, Tripoli residents told AFP that Internet connection had been reestablished for the first time since the outbreak of the revolution in February.
Meanwhile, a rebel party took over an army barracks at a western entrance to Tripoli, raiding the stores of missiles and other ammunition, AFP correspondents at the scene said.
They also released dozens of prisoners held in Maya, 25 kilometres (15 miles) west of Tripoli, they said.
A rebel spokesman said the insurgents were also tightening the noose around loyalist forces in the far west of Libya, near the Tunisian border.
Kadhafi throughout Sunday was adamant he would not relinquish power.
He vowed not to surrender and boasted he would "emerge victorious" in the battle for Tripoli.
"We will not, we will not abandon Tripoli to the occupants and their agents. I am with you in this battle," he said in an audio message broadcast on television in the afternoon.
"We do not surrender and, by God's grace, we will emerge victorious."
He called on his supporters to "march on Tajura in tens of thousands to purge the officials of the colonisers," in a reference to the NATO-backed rebels.
Earlier, he had aired a message urging supporters to "march by the millions" to liberate cities held by "traitors and rats."
And in a third audio message broadcast on state television late at night, he said the people should "go out now to purge the capital," adding that there was "no place for the agents of colonialism in Tripoli and Libya."
NATO Secretary General Anders Fogh Rasmussen said early Monday Kadhafi's rule in Libya is "clearly crumbling."
"The Kadhafi regime is clearly crumbling. The sooner Kadhafi realises that he cannot win the battle against his own people, the better -- so that the Libyan people can be spared further bloodshed and suffering," he said in a statement.
Chief NATO spokeswoman Oana Lungescu earlier told AFP that NATO air strikes since March, mandated under a UN resolution aimed at protecting civilians, had succeeded in diminishing Kadhafi's military capabilities.
"What you are seeing tonight is the cumulative effect, over time, of the eroded capabilities of the regime," Lungescu said, citing more than 4,000 military targets damaged or destroyed in the last four months.