Libyan government forces are said to have begun a new assault on rebel-held positions in the centre of Zawiyah, a city near the capital Tripoli.
Tanks are reported to have opened fire, after troops regrouped following an earlier battle.
Dozens of people are reported to have been killed.
A doctor in Zawiyah has told the Reuters news agency at least 30 people were killed in fighting there on Saturday.
He said the majority were civilian casualties.
Opposition fighters said earlier that they had driven the government forces back from the city centre during a five-hour battle but pro-Gaddafi reinforcements were said to be heading towards Zawiya.
Reports from Zawiya say the town came under attack from both east and west from well-armed government forces, according to the BBC.
The forces used tanks, artillery and machine guns.
The rebels had previously driven out the loyalist forces from the oil town of Ras Lanuf and say they have been pushing further west.
The rebel soliders say their fighters are now in control of the small town of Bin Jawad, about 60 km west of Ras Lanuf and about 525 km east of Tripoli.