Libyan rebels have been locked in fierce battles with pro-Gaddafi forces on two fronts.
Rebel-held Zawiya, just 50km west of Tripoli, was the subject of a fierce government assault. Both sides later claimed to be in control.
Reports from Zawiya said the town had come under attack from both east and west from well-armed government forces.
At least 18 people were killed in the fighting. But one witness told Reuters news agency that 30 civilians had been killed.
Heavy casualties were reported in other key cities, including the eastern port of Ras Lanuf.
Pro-Gaddafi forces withdrew to Ras Lanuf two days ago after a battle a little further east in Brega reports the BBC.
Rebels at Ras Lanuf told news agencies they had taken complete control of the town, but there was no independent confirmation.
Many killed after Beghazi blasts
Dozens of people were also killed and hurt in apparently accidental blasts at an arms dump in rebel-held Benghazi.
Hospital sources in the city, Libya's second-largest, said they believed the two explosions were not triggered by an air strike.
Reports said at least 17 people had been killed in the blasts.
Tear-gas fired after prayers
In Tripoli, the BBC's correspondent in the suburb of Tajoura says that after Friday prayers there was a vociferous protest by anti-Gaddafi demonstrators.
Then, all of a sudden, pro-government militia and police arrived in vehicles firing dozens of tear-gas canisters and baton rounds.
Pro-Gaddafi militias have been roaming Tripoli in civilian cars, according to residents.
A wave of detentions, killings and disappearances has been reported in the city in recent days, and bodies of missing people have reportedly been left in the street.