TRIPOLI, Libya — President Barack Obama said Monday that Libyan strongman Moammar Gadhafi's "rule is over" although elements of his regime continue to resist rebels who have taken control much of the capital.
He appealed to Gadhafi to prevent further bloodshed, and urged opposition forces to build a democratic government through "peaceful, inclusive and just" measures.
In his first appearance since a weekend push by the rebels into the Libyan capital, Obama said there is still fierce fighting in some areas of the city.
"But this much is clear. The Gadhafi regime is coming to an end, and the future of Libya is in the hands of its people."
Obama made his comments on the grounds of a vacation property where he is staying on Martha's Vineyard off the Massachusetts coast.
Libyan rebels claimed to be in control of most of the Libyan capital after their lightning advance on Tripoli heralded the fall of Moammar Gadhafi's nearly 42-year regime, but scattered battles erupted and the mercurial leader's whereabouts remained unknown.
NATO promised to continue airstrikes until all pro-Gadhafi forces surrender or return to barracks.
The relative ease with which the rebels captured Tripoli in an hours-long blitz backed by NATO airstrikes showcased the evolution of the opposition fighters who first rose against the regime six months ago, swiftly capturing the eastern part of the vast North African nation but failing to muster enough punch to advance westward toward Tripoli even with the help of months of NATO airstrikes.
For months, the rebels were judged to be big on zeal but short on organization and discipline, but their stunning success in Tripoli showed a high level of planning, coordination and discipline.
In London, British Prime Minister David Cameron said frozen Libyan assets would soon be released to help the country's rebels establish order, saying Gadhafi's regime was "falling apart and in full retreat."
Clashes broke out early Monday at Gadhafi's longtime command center known as Bab al-Aziziya early Monday when government tanks emerged from the complex and opened fire at rebels trying to get in, according to Abdel-Rahman and a neighbor. An AP reporter at the nearby Rixos Hotel where foreign journalists stay could hear gunfire and loud explosions from the direction of the complex.
Tripoli resident Moammar al-Warfali, whose family home is next to the compound, said there appeared to be only a few tanks belonging to the remaining Gadhafi forces that have not fled or surrendered.
"When I climb the stairs and look at it from the roof, I see nothing at Bab al-Aziziya," he said. "NATO has demolished it all and nothing remains."
The Rixos also remained under the control of Gadhafi forces, with two trucks loaded with anti-aircraft machine guns and pro-regime fighters and snipers posted behind trees. Rebels and Tripoli residents set up checkpoints elsewhere in the city.
A rebel field commander said reinforcements were arriving at Tripoli by sea from the north as well as the south and the southeast.
"Our fighters are coming from all directions and, God willing, today we will liberate the whole city," the commander, Suleiman Sifaw, told The Associated Press.
State TV broadcast bitter audio pleas by Gadhafi for Libyans to defend his regime as the rebels advanced on Sunday. Opposition fighters captured his son and one-time heir apparent, Seif al-Islam, who along with his father faces charges of crimes against humanity at the International Criminal Court in the Netherlands. Another son was under house arrest.
Rebel chief Mustafa Abdel-Jalil vowed Monday to give Gadhafi a "fair trial with all legal guarantees" when captured.
Government spokesman Moussa Ibrahim also 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."
Gadhafi's former right-hand man, who defected last week to Italy, said the longtime leader would not go easily.
"I think it's impossible that he'll surrender," Abdel-Salam Jalloud said in an interview broadcast on Italian RAI state radio, adding that "He doesn't have the courage, like Hitler, to kill himself."
Jalloud, who was Gadhafi's closest aide for decades before falling out with the leader in the 1990s, fled Tripoli on Friday, according to rebels.
The startling rebel breakthrough, after a long deadlock in Libya's 6-month-old civil war, was the culmination of a closely coordinated plan by rebels, NATO and anti-Gadhafi residents inside Tripoli, rebel leaders said. Rebel fighters from the west swept over 20 miles (30 kilometers) in a matter of hours Sunday, 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 the gates of Tripoli, the special battalion entrusted by Gadhafi with guarding the capital promptly surrendered. The reason: Its commander, whose brother had been executed by Gadhafi years ago, was secretly loyal to the rebellion, a senior rebel official, Fathi al-Baja, told The Associated Press.
On Monday, rebels erected checkpoints on the western approaches to the city, handing out candy to passengers and inquiring about their destination. Cars leaving the city were subjected to more rigorous checks.