Explosions and gunfire rang out in Tripoli after dawn as opponents of Muammar Gaddafi rose up in the capital, declaring a final push to topple the Libyan leader after a six-month war reached the city's outskirts.
Gaddafi said in a message broadcast on state television that an assault by rats -- his description of the rebels -- had been repelled, while a senior rebel official said zero hour was approaching for the Libyan leader.
At daybreak, more than 12 hours after the fighting first broke out, shooting could still be heard in the capital, though it was less heavy and sustained.
A Reuters reporter at a hotel in the city center said she could hear bursts of machine gun fire about every few minutes, and occasional booms from heavy weapons.
A rebel activist in Tripoli said pro-Gaddafi forces had positioned snipers on the rooftops of buildings around Bab al-Aziziyah, Gaddafi's compound.
As he spoke, single gunshots could be heard in the background, at intervals of a few seconds.
Residents are crying, seeking help. One resident was martyred, many were wounded, said the activist, who spoke to a Reuters reporter outside Libya. It was not immediately possible to verify his account independently.
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.
But Gaddafi's fall is far from certain. His security forces did not buckle as some rebels had predicted. The uprising appeared to be isolated to a few neighborhoods, and had not spread to the whole city.
The rebels said the uprising was being coordinated with anti-Gaddafi fighters outside the city. They were fighting toward Tripoli from the town of Zawiyah, to the west, and also along the main highway to the south of the capital.
Near the southern front line, rebels were gathering forces to try to advance on Al-Aziziyah, which is about 45 km (27 miles) south of Tripoli and is the southern gateway to the capital.
At a checkpoint south of Al-Aziziyah, a Reuters reporter saw rebels bring mortar launchers up to the front. Pick-up trucks with anti-aircraft guns bolted to the back drove through the checkpoint heading north.
Hopefully we'll take Al-Aziziyah today and then march to Tripoli, said Mohammed, among a group of rebels waiting for the order to move forward.
In an audio recording broadcast soon after midnight, Gaddafi sought to show residents he was still in control.
Those rats ... were attacked by the masses tonight and we eliminated them, Gaddafi said. I know that there are air bombardments but the fireworks were louder than the sound of the bombs thrown by the aircraft.
In the eastern city of Benghazi, the rebel National Transitional Council -- seen by Western powers as Libya's legitimate government -- said the fighting in Tripoli was part of a pre-planned and coordinated revolt.
The zero hour has started. The rebels in Tripoli have risen up, Abdel Hafiz Ghoga, vice-chairman of the rebel National Transitional Council (NTC), based in the eastern Libyan city of Benghazi, told Reuters.
Gaddafi's influential former number two, Abdel Salam Jalloud, who defected to the rebel cause a day earlier, appeared on Al Jazeera by Internet video link and called on the capital to rise against the tyrant.
Tonight you claim victory over fear, he said. An NTC official, Mohammed al-Allaqi, said Jalloud was in Rome.
The clashes inside the capital triggered massive street celebrations in Benghazi as well as elsewhere in rebel-controlled parts of the country and in the capital of neighboring Tunisia.
Rebel advances on Tripoli have transformed the war since they seized the city of Zawiyah on Tripoli's Western outskirts a week ago, cutting the capital off from its main road link to the outside world and putting unprecedented pressure on Gaddafi.
Before dawn, state television showed Gaddafi's son Saif al-Islam addressing what it called a youth conference. A roomful of supporters broke into occasional chants and applause as he declared that the rebels would be defeated.
The revolt in Libya will not succeed. You will never see us as Libyans surrender and raise the white flag: that is impossible. This is our country and we will never leave it.
Residents in Tripoli said the fighting was triggered at sunset, when Muslim clerics used the loudspeakers on mosque minarets to call people on to the streets.
A Reuters reporter in a hotel near the center of Tripoli said there was heavy and sustained gunfire for hours. At times there would be a lull, then it would start up again.
Accounts from residents suggested that the fighting was concentrated in the Tajourah and Fashloom districts in the east of Tripoli, and the Souk al-Jumaa district near the center -- all areas where anti-Gaddafi feeling runs high.
We can hear shooting in different places, another resident said. Most of the regions of the city have gone out, mostly young people ... it's the uprising... They went out after breaking the (Ramadan) fast.
They are shouting religious slogans: 'God is greatest!'
Washington says Gaddafi's days are numbered, and reports have emerged of more defections from his ranks. President Barack Obama, on vacation in Martha's Vineyard, was receiving regular updates on Libya, a senior White House official said.
If Tripoli eventually falls to the rebels, Gaddafi's already limited options become even more limited. Pressure on him and his shrinking circle of loyalists has to be taking a serious toll, a senior White House official said.