The worse bloodshed was in Zawiya, 30 miles west of the capital Tripoli. An army unit loyal to Gadhafi opened fire with automatic weapons on a mosque where residents - some armed with hunting rifles for protection - have been holding a sit-in to support protesters in the capital, a witness said.
The troops blasted the mosque's minaret with an anti-aircraft gun. 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. A Libyan news website, Qureyna, put the death toll at 23 and said many of the wounded could not reach hospitals because of shooting by "security forces and mercenaries."
A day earlier, an envoy from Gadhafi had come to the city from Tripoli and warned the protesters: "Either leave or you will see a massacre," the witness said. On Tuesday night, Gadhafi himself called on his supporters to hunt down opponents in their homes.
Zawiya, a key city close to an oil port and refineries, is the nearest population center to Tripoli to fall into the hands of the anti-Gadhafi rebellion that began Feb. 15. Hundreds have died in the unrest.
Most of the eastern half of Libya has already broken away, and diplomats, ministers and even a high-ranking cousin have abandoned Gadhafi, who has ruled Libya for 41 years. He is still believed to be firmly in control only of the capital, some towns around it, the far desert south and parts of Libya's sparsely populated center.
Gadhafi's crackdown has been the harshest by any Arab leader in the wave of protests that has swept the Middle East the past month, toppling the presidents of Libya's neighbors - Egypt and Tunisia. The New York-based Human Rights Watch has put the death toll in Libya at nearly 300, according to a partial count. Italy's Foreign Minister Franco Frattini said estimates of some 1,000 people killed were "credible."
The upheaval in the OPEC nation has taken most of Libya's oil production of 1.6 million barrels a day off the market, and crude prices have jumped 20 percent to two-year highs in just a week - reaching $99.77 per barrel in afternoon trading in New York and $114.20 in London on Thursday. Most of the oil goes to Europe.
Hours after the attack in Zawiya, Gadhafi called in to state TV and in a rambling speech expressed condolences for the dead but then angrily scolded the city's residents for siding with the uprising.
He blamed the revolt on bin Laden and teenagers 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."
Gadhafi quickly condemned the Sept. 11 attacks that bin Laden masterminded, saying: "We have never seen such a horrific and terrifying act performed in such a exhibitionist manner." He cracked down on his country's Muslim militants, including those linked to al-Qaida. But in 2009, he said bin Laden had shown signs that he is open to dialogue and recommended that President Barack Obama seek an opening with the terrorist leader.
Thousands massed in Zawiya's main Martyrs Square by the Souq Mosque after the attack, 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.
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, denouncing what he called "grave violations to human rights and human and international laws."
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, served as his liaison with Egypt and frequently appeared by his side.
The regime's other attempt to take back lost territory came east of Tripoli. Pro-Gadhafi militiamen - a mix of Libyans and foreign mercenaries - assaulted a small airport outside Libya's third largest city, Misrata, about 120 miles (200 kilometers) from the capital.
Militiamen with rocket-propelled grenades and mortars barraged a line of government opponents 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.
At the same time, officers from an air force school near the airport mutinied and, along with residents, overwhelmed an adjacent military air base where Gadhafi loyalists were holed up, a medical official at the base said. The air force personnel disabled fighter jets at the base to prevent them from being used against the uprising, he said.
The medical official said seven people were killed in the fighting at the airport - six from the opposition camp and one from the attackers - and 50 were wounded, including a six-year-old girl and her 11-year-old sister.
"Now Misrata is totally under control of the people, but we are worried because we are squeezed between Sirte and Tripoli, which are strongholds of Gadhafi," he said.
The doctor, medical officials and witnesses around Libya 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 civil war.
In cities across the east, anti-Gadhafi forces 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.
They now control a swath of territory from the Egyptian border in the east, across nearly half Libya's 1,000-mile (1,600-kilometer) Mediterranean coast to the key oil port of Breqa, about 440 miles (710 kilometers) east of Tripoli.
Libyan Parliament Speaker Mohammed Abul-Qassim al-Zwai, asked whether the government planned to send relief to the rebel-controlled east, told reporters in Tripoli: "We cannot supply these areas because they are chaotic. Police stations have been attacked."
International momentum has been building for action to punish Gadhafi's regime for the bloodshed.
The Swiss government on Thursday ordered a freeze of any assets in Switzerland belonging to Gadhafi. The European Union pushed for Libya to be suspended from the U.N.'s top human rights body over possible crimes against humanity and for the U.N. Security Council to approve a probe into "gross and systematic violations of human rights by the Libyan authorities."
Obama said Wednesday that the crackdown "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.
A number of Arab regimes, concerned about the unrest, have taken pre-emptive measures to try to head off the type of mass uprisings that swept through Egypt and Tunisia and now, Libya.
Algeria, another North African Arab state, on Thursday officially lifted a state of emergency in place for the past 19 years. The decision to do away with the restrictive measure has long been demanded by opposition parties and civil society and it comes amid a flurry of strikes and protests in a wide range of sectors - clearly a gesture aimed at restoring a measure of calm.
In Libya, Tripoli saw an outbreak of major protests against Gadhafi's rule earlier this week, met with attacks by militiamen who shot protesters on sight and killed dozens. One morning earlier in the week, residents awoke and reported bodies littering the streets in some neighborhoods.
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 government rivals among the injured. He said a friend's relative being treated there escaped only because doctors hid him.
A witness in Tripoli told the AP after touring the capital that security around the city has been relaxed except for two locations that are very heavily guarded. The state TV and radio building was surround by dozens of heavily armed soldiers and several vehicles with heavy machine guns as well as the road leading to Gadhafi's residence. A number of residents have reported that the army deployed tanks Wednesday in Tripoli's eastern suburb of Tajoura.
Late Thursday night in Tajoura, a vehicle with armed men drove by a group of protesters gathering near a clinic and sprayed the crowd with gunfire, a witness said. Residents of Tajoura, which has seen near daily clashes, have also hoisted the old monarchy flag up in a neighborhood square as a show of defiance against the regime.
Some Tripoli residents reported receiving text messages on their cell phones Thursday urging them to go protest in the capital's central Green Square after Friday prayers. The plaza was the site of intense clashes earlier in the week between government supporters and protesters.
Gadhafi and his son, Seif al-Islam, have gone on state television over the past few days to try to portray the uprising as a choice between the order of the old regime or chaos, civil war and "rivers of blood" that could destroy the country's oil wealth.
In his call to state TV, Gadhafi alternated between bitterly lashing out at Zawiya's residents - and by extension others in the population - for being ungrateful and telling them to control what he depicted as an uprising by misguided teenagers.
"If you want to destroy (the country), it's your problem," he said. "If you want to live in this chaos, you are free."
"You should go out and stop the young people who are carrying RPGs and rifles," he said. "If the men are afraid let the women go out."
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.
Those who have joined the uprising dismissed his claim that it was led by al-Qaida.
"These are all lies," said Gadhafi's former justice minister, Mustafa Abdel-Jalil, who has sided with the opposition. "There are no al-Qaida, no terrorist organizations."
In eastern, opposition-held Benghazi, Libya's second largest city, a prominent protest organizer who works closely with the administration now running the city, said his camp was "trying to fight the propaganda that the regime is trying to send all over the world, that we are calling an independent state in the state or that we are calling for an Islamic state."
The parliament speaker, al-Zwai, held out some concessions to the opposition, saying an investigative committee will be formed to look into the unrest and work will begin soon to draft a constitution. He also spoke about reforms such as giving salaries to the unemployed and soft loans to others.