Libyan rebels have advanced into two strategic towns controlling access to the capital, Tripoli, from the west and the south.
Fighting was reported in both Zawiya, just 50km (30 miles) west of Tripoli, and Gharyan, 80km to the south.
A spokesman for Col Muammar Gaddafi's government said both towns remained "under our full control".
If the towns fall to the rebels, they would have Tripoli surrounded by land, with Nato blocking sea access.
Foreign correspondents in Zawiya reported battles continuing between rebels and government forces a day after rebels pushed into the town in a dramatic advance.
Rebel fighters raised their red, green and black flag over the central market on Sunday, but gunshots and explosions could be heard in the town.
The rebels said pro-Gaddafi gunmen were sited on high buildings shooting at them.
Decisive moment
Zawiya controls the main road west from Tripoli to the Tunisia - a key supply route for Col Gaddafi's forces.
Zawiya's oil refinery - the only one in western Libya - also supplies his forces with most of their fuel.
The BBC's Matthew Price in Tripoli says Col Gaddafi's forces can be expected to fight tooth-and-nail for both assets.
Zawiya's loss would prove a decisive moment in the conflict, giving the rebels the upper hand, says our correspondent.
The city was briefly held by rebel forces early in the uprising against Col Muammar Gaddafi's rule this year but they were driven out by tanks and suffered heavy casualties.
Last week, hundreds of rebels pushed out of the Nafusa Mountains in the west, down towards the towns of the coastal plain in an offensive aimed at ending months of deadlock.
Heavy gunfire was also reported on Sunday in Ghaniya, south of Tripoli, and a Reuters correspondent said columns of smoke rose from the city.
Rebels said they had reached the centre of the town and were in control of 70% of it.
Military success in the west is crucial to the rebels, who have struggled to make advance from their stronghold around Benghazi in the east.