In a rambling phone call to state TV, Gadhafi accused al-Qaida leader Osama bin Laden of being behind the uprising. The Libyan leader said the revolt that began Feb. 15 has been carried out by young men hopped up on hallucinogenic pills given to them "in their coffee with milk, like Nescafe."
"Shame on you, people of Zawiya, control your children," he said, addressing residents of the city outside Tripoli where the mosque attack took place. "They are loyal to bin Laden," he said of those involved in the uprising. What do you have to do with bin Laden, people of Zawiya? They are exploiting young people ... I insist it is bin Laden."
The attacks Thursday aimed to push back a revolt that has moved closer to Gadhafi's bastion in the capital, Tripoli. Most of the eastern half of Libya has already broken away, and parts of Gadhafi's regime have frayed.
In the latest blow to the Libyan leader, a cousin who was one of his closest aides, Ahmed Gadhaf al-Dam, announced that he has defected to Egypt in protest against the regime's bloody crackdown. He denounced what he called "grave violations to human rights and human and international laws."
In Zawiya, 30 miles (50 kilometers) west of Tripoli, an army unit attacked the Souq Mosque, where regime opponents had been camped for days in a protest calling for Gadhafi's ouster, a witness said. The soldiers opened fire with automatic weapons and hit the mosque's minaret with fire from an anti-aircraft gun, he said. Some of the young men among the protesters, who were inside the mosque and in a nearby lot, had hunting rifles for protection.
A doctor at a field clinic set up at the mosque said he saw the bodies of 10 dead, shot in the head and chest, as well as around 150 wounded.
The witness said that a day earlier, an envoy from Gadhafi had come to the city and warned protesters: "Either leave or you will see a massacre." Zawiya is a key city near an oil port and refineries.
After Thursday's assault, thousands massed in Zawiya's main Martyrs Square by the mosque, shouting for Gadhafi to "leave, leave," the witness said. "People came to send a clear message: We are not afraid of death or your bullets," he said.
The other attack came at a small airport outside Misrata, Libya's third largest city, where anti-government rebels claimed control Wednesday. Pro-government militiamen with rocket-propelled grenades and mortars barraged a line of their rivals who were guarding the airport, some armed with rifles, said one of the rebels who was involved in the battle.
During the fighting, the airport's defenders seized an anti-aircraft gun used by the militias and turned it against them, he said.
A medical official at a military air base by the airport said five people were killed in the fighting - four from the opposition camp and one from the attackers - and 40 were wounded. He said personnel at the base had sided with the Misrata uprising and had disabled fighter jets there to prevent them being used against rebellious populaces.
"Now Misrata is totally under control of the people, but we are worried because we squeezed between Sirte and Tripoli, which are strongholds of Gadhafi," he said. Sirte, a center for Gadhafi's tribes, lies to the southeast of Misrata.
The militias pulled back in the late morning. In Misrata, the local radio - controlled by the opposition like the rest of the city - called on residents to march to the airport to reinforce it, said a woman who lives in downtown Misrata.
In the afternoon, it appeared fighting erupted again, she said, reporting heavy booms from the direction of the airport on the edge of the city, located about 120 miles (200 kilometers) east of Tripoli.
All the witnesses and medical officials spoke on condition of anonymity for fear of reprisals.
Gadhafi's crackdown has so far helped him maintain control of Tripoli, home to about a third of Libya's 6 million population. But the uprising has divided the country and raised the specter of a civil war: In cities across the east, residents rose up and overwhelmed government buildings and army bases, joined in many cases by local army units that defected. In those cities, tribal leaders, residents and military officers have formed local administrations, passing out weapons looted from the security forces' arsenals.
The leader's cousin, Gadhaf al-Dam, is one of the highest level defections to hit the regime so far, after many ambassadors around the world, the justice minister and the interior minister all sided with the protesters.
Gadhaf al-Dam belonged to Gadhafi's inner circle, officially his liaison with Egypt, but he also served as Gadhafi's envoy to other world leaders and frequently appeared by his side.
In a statement issued in Cairo on Thursday, Gadhaf al-Dam said he had left Libya for Egypt "in protest and to show disagreement" with the crackdown.
Gadhafi's control now has been reduced to the northwest corner around Tripoli, the southwest deserts and parts of the center. The uprisings in Misrata, Zawiya and several small towns between the capital and Tunisian border have further whittled away at that bastion.
The Zawiya resident said that until Thursday's attack, Gadhafi opponents held total sway in the city after police fled days earlier. Residents had organized local watchgroups to protect government buildings and homes.
The capital, Tripoli, saw an outbreak of major protests against Gadhafi's rule earlier this week, met with attacks by militiamen that reportedly left dozens dead.
Pro-Gadhafi militiamen - a mix of Libyans and foreign mercenaries - have clamped down on the city since the Libyan leader went on state TV Tuesday night and called on his supporters to take back the streets. Residents say militiamen roam Tripoli's main avenues, firing the air, while neighborhood watch groups have barricaded side streets trying to keep the fighters out and protesters lay low.
At the same time, regular security forces have launched raids on homes around the city. A resident in the Ben Ashour neighborhood said a number of SUVs full of armed men swept into his district Wednesday night, broke into his neighbor's home and dragged out a family friend as women in the house screamed. He said other similar raids had taken place on Thursday in other districts.
"Now is the time of secret terror and secret arrests. They are going to go home to home and liquidate opponents that way, and impose his (Gadhafi's) control on Tripoli," said the witness.
Another Tripoli resident said armed militiamen had entered a hospital, searching for protesters among the injured. He said a friend's relative being treated there escaped only because doctors hid him.
International momentum has been building for action to punish Gadhafi's regime for the bloodshed.
President Barack Obama said Wednesday the suffering in Libya "is outrageous and it is unacceptable," and he directed his administration to prepare a full range of options, including possible sanctions that could freeze the assets and ban travel to the U.S. by Libyan officials.
French President Nicolas Sarkozy raised the possibility of the European Union cutting off economic ties.
Another proposal gaining some traction was for the United Nations to declare a no-fly zone over Libya to prevent it using warplanes to hit protesters. U.N. High Commissioner for Human Rights Navi Pillay said that if reports of such strikes are confirmed, "there's an immediate need for that level of protection."
Italy's Foreign Minister Franco Frattini said estimates of some 1,000 people killed in the violence in Libya were "credible," although he stressed information about casualties was incomplete. The New York-based Human Rights Watch has put the death toll at nearly 300, according to a partial count.
Gadhafi's son Seif al-Islam claimed Thursday that the reported death tolls have been exaggerated, although he didn't provide his own figure. In a press conference aired on state TV, he said the number killed by police and the army had been limited and "talking about hundreds and thousands (killed) is a joke."
He also said a committee had been formed to investigate alleged foreign involvement in the protests.
Earlier Thursday, Libyan TV showed Egyptian passports, CDs and cell phones purportedly belonging to detainees who had allegedly confessed to plotting "terrorist" operations against the Libyan people. Other footage showed a dozen men lying on the ground, with their faces down, blindfolded and handcuffed. Rifles and guns were laid out next to them.
Michael reported from Cairo. Associated Press writers Sarah El Deeb and Bassem Mroue contributed to this report.