30 people have been killed by pro-Gadaffi forces attacks in Zawiyah and 19 more have died in an explosion in Benghazi at a weapons depot.
The Libyan army staged a prolonged artillery barrage on the city of Zawiyah, west of Tripoli.
A rebel spokesman said there had been heavy shelling of Zawiyah by Gaddafi's forces and reports of many casualties.
Elsewhere, explosions minutes apart at a Libyan military weapons depot killed 19 people and wounded dozens more outside the main rebel-held city of Benghazi.
Residents living up to 10km from the main weapons warehouse southeast of Benghazi, said windows shook and an inferno lit up the night sky, as ambulances raced to bring the casualties to hospital.
The cause of the explosions was not immediately clear, although most local residents ruled out an air strike by forces loyal to Libyan leader.
Earlier, shots were fired across a district of the Libyan capital as forces loyal to Libyan leader Muammar Gaddafi tried to break up a crowd of protestors.
The demonstrators spilled out of the Murat Adha mosque in the Tajoura district of eastern Tripoli after Friday prayers.
Several hundred of them began chanting for an end to Gaddafi's 40 years in power, shouting 'Gaddafi is the enemy of God!'.
A few minutes later, pro-Gaddafi security forces arrived at the scene of the protest.
'They fired tear gas. I heard shooting. People are scattering,' said a Reuters reporter.
Another reporter on the edge of the Tajoura district said heavy shooting could be heard and a convoy of 14 Toyota sports utility vehicles, with security forces on board, sped through a checkpoint towards the site of the protest.
Earlier, rebels in eastern Libya said they would not negotiate unless Muammar Gaddafi stood down and went into exile.
The National Libyan Council in the city of Benghazi, which is controlled by the opposition, also called again for foreign intervention to stop government air raids.
Stronghold in capital
Tripoli is Gaddafi's principal stronghold after large swathes of the country rejected his rule.
The authorities have tried to portray the capital as a city going about its life as normal, but today's protest punctured that image.
'This is the end for Gaddafi. It's over. Forty years of crimes are over,' said Faragha Salim, an engineer at the protest in Tajoura.
A revolt against Gaddafi's four-decade rule has left the eastern side of the country, and several towns elsewhere, in rebel control.
Authorities have tried to prevent foreign media from reporting independently on the protests in Tripoli.
In some cases security guards have attempted to block journalists from travelling to neighbourhoods in the capital where anti-Gaddafi protests are anticipated.
A Libyan government spokesman said journalists' movements were being restricted because their presence could trigger violence from what he described as affiliates of al-Qaeda.
'These are exceptional circumstances. I know you're going to talk about it and twist it the way you want,' said the spokesman, Mussa Ibrahim.
'We are preparing to pay this price of preventing you guys from reporting to avoid turning Tripoli into Baghdad.'