Wild celebrations as rebels seize heart of Libyan capital (VIDEO)

Tens of thousands of Libyans celebrate in central Tripoli after rebels stormed the city.

Libyan rebels stormed into the heart of Tripoli on Monday, meeting little resistance from Muammar Gaddafi's forces and sparking scenes of jubilant celebration in the capital's Green Square.

U.S. President Barack Obama said the time had come for Gaddafi to relinquish power to avoid further casualties as the rebels battled for total control of the Libyan leader's stronghold, Reuters reported.

"The surest way for the bloodshed to end is simple: Muammar Gaddafi and his regime need to recognize that their rule has come to an end," Obama said in a statement.

"Gaddafi needs to acknowledge the reality that he no longer controls Libya. He needs to relinquish power once and for all."

AFP news agency said rebels controlled swathes of the city and had arrested the strongman's son and heir apparent, Seif Al Islam.

The rebel leadership said the presidential guard protecting Gaddafi had surrounded, the New York Times reports.

The National Transitional Council released a mass text message saying, "“We congratulate the Libyan people for the fall of Muammar Gaddafi and call on the Libyan people to go into the street to protect the public property. Long live free Libya."

Even as tens of thousands of people poured into the center of the capital to celebrate, waving rebel flags and firing their weapons into the air, reporters said there were fears of snipers and a loyalist counter-attack.

"I warn you, there are still pockets of resistance in and around Tripoli," National Transitional Council chairman Mustafa Mohammed Abdul Jalil told BBC Monday.

There were reports from journalists and bloggers about gunbattles in Tripoli Monday morning. CNN's Jomana Karadsheh wrote on Twitter: "Intense fighting sounds coming from bab al-Aziziya & smoke in the distance. #Tripoli #Libya"

Gaddafi's whereabouts were not known, but the veteran leader continued to broadcast messages urging his supporters to fight and vowing never to relinquish power.

"We will not, we will not abandon Tripoli to the occupants and their agents. I am with you in this battle," he said in one message.

"We do not surrender and, by God's grace, we will emerge victorious."

In another message he urged supporters to "march by the millions" to liberate cities held by "traitors and rats," AFP reported.

A spokesman for the National Transitional Council told a Sky News reporter that sons Seif Al Islam, Saadi and Mohammed Gaddafi have been captured. Like his 69-year-old father, Seif faces charges of crimes against humanity at the International Criminal Court.

Earlier Sunday, hundreds of rebels overran the base of the Khamis brigade assigned to defend the capital. They carted away truckloads of weapons and raced towards Tripoli with almost no resistance.

The rebels made these giant leaps forward after six months of civil war and NATO bombing under a UN mandate to protect civilians, following a popular uprising against Gaddafi's iron-fisted rule.

Along the way into Tripoli, rebels freed several hundred prisoners from a political prisons around Tripoli.

An AFP reporter said the night was mainly calm although the sound of fighting was heard early on Monday in the south of the capital. By daybreak it was still not clear how much of the capital the rebels controlled.

Obama called on the rebels to respect human rights and safeguard state institutions.

"Tonight, the momentum against the Gaddafi regime has reached a tipping point. Tripoli is slipping from the grasp of a tyrant," Obama said from vacation at Martha's Vineyard.

"The Gaddafi regime is showing signs of collapsing. The people of Libya are showing that the universal pursuit of dignity and freedom is far stronger than the iron fist of a dictator."

The New York Times quoted American and NATO officials as saying U.S. aerial surveillance around Tripoli was a "major factor" in tipping the battlefield advantage to the rebels.

They also confirmed the rebels received close air support from NATO and training from British, French and other countries' special forces on the ground.

The Libyan government says such interference contravenes the UN mandate to protect civilians.