Army units and militiamen loyal to Muammar Gaddafi have struck back against protesters, attacking a mosque where many had taken refuge and opening fire on others protecting a local airport.
A resident near the airport reported piles of bodies left behind and a "swamp of blood".
The assaults aimed to push back a rebellion that has moved closer to Colonel Gaddafi's bastion in the capital, Tripoli. The revolt has already split off much of the eastern half of Libya.
In the latest blow to the Libyan leader, a cousin who is one of his closest aides, Ahmed Gadhaf al-Dam, announced that he has defected to Egypt in protest against the regime's bloody crackdown against the uprising, denouncing what he called "grave violations to human rights and human and international laws".
In the city of Zawiya, 30 miles west of Tripoli, an army unit attacked a mosque where protesters had been camping inside and in an area outside for several days, a witness said.
The soldiers opened fire with automatic weapons and hit the mosque's minaret with anti-aircraft missiles, he said.
He said there were casualties, but could not give exact figures. He said a day earlier an envoy from Col Gaddafi had come to the city and warned protesters: "Either leave or you will see a massacre."
A doctor at a field clinic set up at the Zawiya mosque said he saw the bodies of 10 dead, shot in the head and chest, as well as around 150 wounded.
The other attack came at a small airport outside Misrata, Libya's third largest city, where rebels claimed control on Wednesday. Militiamen attacked a line of residents who were protecting the facility, opening fire with rocket-propelled grenades and mortars, said a resident who saw the assault
"They left piles of human remains and a swamp of blood," he said. "The hospitals are packed with those killed and injured."