Libyan leader Muammar Gadafy said today he will stay in Tripoli "until the end" and called on his supporters around the country to help liberate the capital from a rebel offensive.
He said in an audio message played over state television he was "afraid that Tripoli will burn" and he said he would provide weapons to supporters to fight off the rebels.
His comments came as Libyan rebels battled their way closer to Tripoli to help fighters inside the city who rose up overnight declaring a final showdown with Col Gadafy.
The Libyan leader earlier dismissed the rebels as "rats" and said he would not yield. But his grip on power looked more fragile than ever after rebels, fighting for the past six months to end his rule, advanced to within about 25km of Tripoli's western edge.
"We're going to Tripoli now," said Moussa, a rebel fighter raised in the United States, near the front line in the village of Al-Maya.
As he spoke, rebel pick-up trucks and a tank trundled down the highway which traces the Mediterranean coast towards Tripoli. Anti-aircraft guns, adapted by the rebels to shoot targets on the ground, pounded away nearby.
In a co-ordinated revolt that rebel cells had been secretly preparing for months, shooting started last night across Tripoli, moments after Muslim clerics, using the loudspeakers on mosque minarets, called people on to the streets.
The fighting inside Tripoli, combined with rebel advances to the outskirts of the city, appeared to signal the decisive phase in a six month conflict that has become the bloodiest of the "Arab Spring" uprisings and embroiled Nato powers.
"Gadafy's chances for a safe exit are diminishing by the hour," said Ashour Shamis, a Libyan opposition activist and editor based in Britain.
But Gadafy's fall is far from certain. His security forces did not buckle, and the city is much bigger than anything the mostly amateur anti-Gadafy fighters, with their scavenged weapons and mismatched uniforms, have ever tackled.
If the Libyan leader is forced from power, there are question marks over whether the opposition can restore stability in this oil exporting country. The rebels' own ranks have been wracked by disputes and rivalry.
Rebels said after a night of heavy fighting, they controlled a handful of city neighbourhoods. Whether they hold on could depend on the speed with which the other rebels reach Tripoli.
"The rebels may have risen too early in Tripoli and the result could be a lot of messy fighting," said Oliver Miles, a former British ambassador to Libya. "The regime may not have collapsed in the city to quite the extent they think it has."
But the rebel advance towards the city was rapid, and there was no sign of fierce resistance from Gadafy's security forces. In the past 48 hours, the rebels west of Tripoli have advanced about 25 km, halving the distance between them and the capital.
Government forces put up a brief fight at the village of Al-Maya, leaving behind a burned-out tank, and some cars that had been torched. "I am very happy," said one resident.
The anti-Gadafy fighters paused long enough to daub some graffiti on walls in the village.
One read "We are here and we are fighting Gadafy," another, "God is great." They then moved on towards Tripoli.
In Benghazi, the eastern Libyan city where the anti-Gadafy revolt started and where the rebels have their main stronghold, a senior official said everything was going according to plan.
"Our revolutionaries are controlling several neighbourhoods and others are coming in from outside the city to join their brothers at this time," Abdel Hafiz Ghoga, vice-chairman of the rebel National Transition Council, said.
In an audio recording broadcast late yesterday, Col Gadafy - whose location has been kept a secret since Nato warplanes started bombing government buildings - made clear he had no intention of giving in to the rebels.
"Those rats ... were attacked by the masses tonight and we eliminated them," Col Gadafy said.
"I know that there are air bombardments but the fireworks were louder than the sound of the bombs thrown by the aircraft."
A spokesman for Col Gadafy, in a briefing for foreign reporters, underlined the message of defiance.
The armed units defending Tripoli from the rebels "wholeheartedly believe that if this city is captured the blood will run everywhere so they may as well fight to the end," said the spokesman, Moussa Ibrahim.
"We hold Mr Obama, Mr Cameron and Mr Sarkozy morally responsible for every single unnecessary death that takes place in this country," he said, referring to the leaders of the United States, Britain and France.
A diplomatic source in Paris, where the government has closely backed the rebels, said underground rebel cells in the capital had been following detailed plans drawn up months ago and had been waiting for a signal to act.
That signal was "iftar" - the moment when Muslims observing the holy months of Ramadan break their daily fast. It was at this moment that imams started broadcasting their message from the mosques, residents said.
But the overnight fighting inside the city, while fierce, was not decisive. Rebels said they controlled all or parts of the Tajourah, Fashloom and Souk al-Jumaa neighourhoods, yet there was no city-wide rebellion.
In Tripoli today, the two sides appeared to be jockeying for control of roof terraces to use as firing positions, possibly in preparation for a new burst of fighting after dark.
A rebel activist in the city said pro-Gadafy forces had put snipers on the rooftops of buildings around Bab al-Aziziyah, Col Gadady's compound, and on the top of a nearby water tower.
As he spoke, single gunshots could be heard in the background, at intervals of a few seconds.
"Gadafy's forces are getting reinforcements to comb the capital," said the activist, who spoke by telephone to a Reuters reporter outside Libya.
"Residents are crying, seeking help. One resident was martyred, many were wounded," he said. It was not immediately possible to verify his account independently.
State television flashed up a message on the screen urging residents not to allow rebel gunmen to hide on their rooftops.
"Agents and al-Qaeda members are trying to destabilise and sabotage the city. You should prevent them from exploiting your houses and buildings, confront them and cooperate with counter-terrorism units, to capture them," it said.
Reuters