The 69-year-old leader, urging civilians to take up arms against rebel "rats", said in an audio broadcast that he was in the city and would be "with you until the end". But there was little sign of popular opposition to the rebel offensive, two of Gaddafi's sons were seized and it was unclear where he was.
Reuters correspondents saw rebel forces hunt sharpshooters from building to building. Sporadic gunfire and shelling kept civilians off the streets, waiting anxiously for the fighting to end after a brief outpouring of jubilation late on Sunday.
"Revolutionaries are positioned everywhere in Tripoli," said a senior rebel in the city, who used the name Abdulrahman.
"But Gaddafi's forces have been trying to resist. There is gunfire everywhere," he added, saying government tanks were in action near Tripoli's Mediterranean port and downtown near Gaddafi's Bab al-Aziziya compound.
World leaders were in no doubt that, after six months of an often meandering revolt backed by NATO air power, the disparate and often fractious rebel alliance was about to take control of the North African desert state and its extensive oil reserves.
Some warned of a risk of a longer, anarchic civil war after what has been the bloodiest of the Arab Spring uprisings inspired by the overthrow of autocrats in Tunisia and Egypt.
State television seemed still to be held by Gaddafi loyalists. "The morale of our troops is high," a presenter said.
In a coordinated move late on Saturday by rebel cells in the capital and assaults on several fronts, Tripoli saw some of the heaviest fighting of the war. A government official told Reuters 376 people on both sides were killed, and about 1,000 wounded.
Civilians had flocked late on Sunday to Green Square, long the showpiece of the leader's personality cult, waving rebel flags. Some said they would rename it Martyrs' Square.
But early on Monday, rebel spokesman Nouri Echtiwi said, tanks and pick-up trucks mounted with machineguns had emerged from Gaddafi's Bab al-Aziziya compound.