Muammar Gaddafi was a hunted man on Monday as loyal remnants of his forces made last-ditch stands in the capital while world leaders rushed to embrace the fractious rebel movement as new masters of Libya's oil riches.
Two days after their irregular armies launched pincer thrusts into Tripoli in tandem with an uprising in the city, Gaddafi's tanks and sharpshooters appeared to hold only small areas, including his Bab al-Aziziya headquarters compound.
Gaddafi's whereabouts were not known. Rebels said they held three of his sons, including his heir apparent Seif al-Islam.
Civilians, who had mobbed the streets on Sunday to cheer the end of dictatorship, stayed indoors as machinegun fire and explosions punctuated some of the heaviest fighting of the Arab Spring uprisings that have been reshaping the Middle East.
President Barack Obama said the conflict was not quite finished but that Gaddafi's 42-year rule was over. He urged him to surrender to end the bloodshed. Obama and his NATO allies backed the six-month revolt with air power but eschewed the ground combat that cost American lives in Iraq and Afghanistan.
Your revolution is your own, he told Libyans, offering U.S. aid but not troops and urging the rebels to avoid settling scores in blood. The Libya you deserve is within your reach.
Reuters correspondents witnessed firefights and clashes with heavy weapons, including anti-aircraft guns, as rebels tried to flush out snipers and pockets of resistance. Hundreds of people seem to have been killed or wounded since Saturday.
Al-Jazeera said that of three Gaddafi sons captured, one -- Mohammed -- had escaped. It added that the body of a fourth, military commander Khamis, might have been found along with that of powerful intelligence chief Abdullah al-Senussi.
The station, based in Qatar whose rulers have provided the most visible Arab support to the rebels, cited unnamed sources.
In a last, defiant, audio broadcast on Sunday before state television went off the air, Gaddafi said he was still in Tripoli, and would stay until the end. There has been speculation he might seek refuge in his home region around Sirte, or abroad.
It is over two months since he was last seen in public.
EMBASSIES CHANGE FLAGS
A U.S. official said there was no evidence Gaddafi had fled the country. He has few friends left. His prime minister turned up in Tunisia. More Libyan embassies hoisted the rebel flag.
Today is a great day for Libya, declared Ali Awidan, the ambassador to the African Union in Addis Ababa. He reminded African states which were once among Gaddafi's few allies that rebels would now control Libya's billions of dollars.
Gaddafi will soon be captured, the envoy said.
Foreign governments which had hesitated to take sides, among them Gaddafi's Arab neighbors, Russia and China also made clear his four decades of absolute power were over.
Western powers who have mounted air strikes in support of a variety of rebel groups, urged the 69-year-old Brother Leader to halt the bloodshed after six months of civil war that had ebbed and flowed over wide expanses of North African desert.
French President Nicolas Sarkozy, who took an early gamble on the rebels and may now reap diplomatic benefits, called on the Gaddafi loyalists to turn their back on the criminal and cynical blindness of their leader by immediately ceasing fire.
Paris offered to host a summit on Libya next week.
Egypt, still grappling with the fall of its own autocrat, abandoned its caution and recognized the rebel government. Other beleaguered Arab revolutionaries, notably in Syria, may take heart from a hard-fought triumph in the sands of Libya.
After Gaddafi, Syrian President Bashar al-Assad must be the most miserable person on earth, said Abdulkhaleq Abdulla, a political scientist in the United Arab Emirates: Gaddafi's fall, he said, will also inspire the Syrian people.
Among those detained was Saif al-Islam Gaddafi, the face of his father's rapprochement with the West over the past decade but now indicted with his father for crimes against humanity. The International Criminal Court said it hoped to question him at The Hague, though a rebel official said Libya might try him.
A rebel official in the eastern city of Benghazi, seat of the opposition National Transitional Council, said some of its representatives had slipped in to Tripoli in recent days to make contact with authorities hitherto loyal to Gaddafi with the aim of averting a breakdown of order in the capital.
Shamsiddin Abdulmolah said would-be defectors had been persuaded in recent weeks to stay in their jobs in Tripoli to help run the city. Each neighborhood has its own little council and today they've taken over administration including military affairs and security, he said.
There have been concerns that tribal, ethnic and political divisions among the diverse armed groups opposed to Gaddafi could lead to the kind of blood-letting seen in Iraq after the overthrow of Saddam Hussein. However, the presence of former Gaddafi aides in the rebel camp is cited by some as cause to hope the opposition can prove more inclusive than that in Iraq.
NTC head Mustafa Abdel Jalil, who was Gaddafi's justice minister until joining the revolt in February, told a news conference in Benghazi: I call on all Libyans to exercise self-restraint and to respect the property and lives of others and not to resort to taking the law into their own hands.
Saddam managed to slip away from Baghdad and hide from U.S. forces in Iraq for eight months in 2003. It was less clear that Gaddafi, unsure of loyalty even among his own tribe, could find refuge. However, he has had access to vast wealth and his Bab al-Aziziya compound in Tripoli covers a network of blastproof tunnels and bunkers which are assumed to include escape routes.
Western leaders reiterated their refusal to commit military forces to peacekeeping in Libya, which could mean tackling rearguard loyalists using urban guerrilla tactics. But some governments have had civilian advisers in Benghazi for months, and the swift military advance of recent days revived questions about the shadowy role of foreign special forces on the ground.
COMPETITION FOR OIL
Jalil said the National Council would favor foreign countries that had supported the rebellion -- a potential blow to the likes of Chinese and Russian oil companies, though they are not the only ones to have cut deals with Gaddafi.
Western governments had competed for the veteran ruler's favor in recent years after negotiating a grudging resolution to decades of conflict, during which Gaddafi's anti-colonial campaigns saw him support a range of armed groups from the Palestinians to the IRA and take responsibility for the downing of an American airliner over Lockerbie in Scotland in 1988.
First signs emerged of moves to begin restoring oil production that has been the foundation of the economy and a source of hope for Libya's six million, mostly poor, people. Staff from Italy's Eni arrived to look into restarting facilities, said Foreign Minister Franco Frattini.
Italy, Libya's nearest European neighbor and the colonial power until World War Two, is a big customer for Libyan energy. But it will face stiff competition from others seeking a share of Libya's wealth -- a competition some fear could test the ability of untried rebel leaders to hold the country together.
Civilians had flocked late on Sunday to Tripoli's Green Square, long the showpiece of Gaddafi's personality cult, waving rebel flags. Some said they renamed it Martyrs' Square.
Young men burned the green flags of the government and raised the rebel tricolor used by the post-colonial monarchy which Gaddafi overthrew in a military coup in 1969.
A government official told Reuters late on Sunday that 376 people on both sides had been killed, and about 1,000 wounded, though it was unclear how the figures were arrived at.
The Rixos Nasr hotel, where the government has obliged foreign reporters to stay throughout the war, pro-Gaddafi guards prevented journalists from leaving.
Only five months ago, Gaddafi forces were set to crush the rebel is Benghazi. His forces, he said, would hunt them down alley to alley, house to house, room to room.
It is a refrain the rebels are now throwing back at him.