A BBC correspondent with rebels who took Zawiya on Saturday says they have now taken Jaddayim, the first town en route to Tripoli, 40km (25 miles) east.
Earlier, Col Muammar Gaddafi told state TV that the “rats” [rebels] had been eliminated in the capital.
Rebels are moving on two other fronts.
They took Zlitan, 160km (100 miles) east of Tripoli and are also advancing from the south, while Nato warships control access to the sea.
A rebel official said their supporters had started to rise up in Tripoli, but the violence appeared to peak late on Saturday night and there is still much support for Colonel Gaddafi in the city, correspondents say.
Pro-Gaddafi forces have been fighting back at the oil port of Brega, with the rebels admitting that they had fallen back from the eastern town’s industrial zone under heavy bombardment.
Clerics ‘call to rise up’
The BBC’s Rupert Wingfield-Hayes in Jaddayim says hundreds of rebel fighters are in the town, both on foot and travelling in pick-up trucks.
He says the town was taken after heavy fighting on Sunday morning.
Our correspondent says this is starting to feel like this may be the beginning of the march on Tripoli. This rebel advance seems to have more momentum than previous ones and has more support from Nato forces, he adds.
Four loud explosions were heard in Tripoli on Sunday morning following hours of sustained gunfire in the city.
There were reports of protests and gunfire in areas to the north and east of Tripoli, including the Tajoura district, where there was trouble at the start of this uprising against Col Gaddafi, the BBC’s Matthew Price reports from the capital.
The most intense period of fighting came at around 11pm but the level of gunfire was much reduced by Sunday morning, our correspondent says.
The overnight fighting was almost certainly opponents of Colonel Gaddafi already in scattered parts of Tripoli rising up against pro-Gaddafi forces, rather than rebel forces advancing into the capital, our correspondent adds.
Abdel Hafiz Ghoga, vice-chairman of the rebel National Transition Council (NTC), was quoted as saying by Reuters news agency: “The zero hour has started. The rebels in Tripoli have risen up.”
“There is co-ordination with the rebels in Tripoli. This was a pre-set plan,” said Mr Ghoga.
But Col Gaddafi’s Information Minister Moussa Ibrahim later put the trouble down to “small armed gangs”.
“Tripoli is safe, and completely under the control of the armed people committees and the volunteers and the honourable people of Tripoli,” the minister said.
“Some gunmen entered two or three areas of Tripoli. They were confronted and everything ended within half an hour.”
In an audio broadcast shortly afterwards, Col Gaddafi congratulated his supporters for repelling the rebels.
“Those rats were attacked by the masses tonight and we eliminated them,” he said.
“I know you are happy and I saw the fireworks in Green Square, I know that there are air strikes but the fireworks were louder than the air bombing.”
His son, Saif al-Islam, ruled out any possibility of surrender.
“I see ourselves as victorious, I see our position is strong,” he said in a speech on state TV.
He did, however, urge the rebels to open talks.
“If you want peace, we are ready,” he said.
The Libyan leader certainly has support in Tripoli, our correspondent says.
Pro-Gaddafi men and women have received weapons training in recent weeks, while checkpoints have sprung up across the city.
A Tripoli resident told Reuters that Muslim clerics had called for people to rise up in parts of the Libyan capital.
The resident said the imams made the call as Muslims were breaking their daytime fast during the holy month of Ramadan on Saturday evening.
In his audio message, Col Gaddafi condemned “traitors” who were “defiling mosques” in the mainly Muslim country.
Meanwhile, a small number of Britons who have remained in Libya’s capital, Tripoli, were being evacuated on a ship to Malta, the Foreign Office said on Sunday.