The death toll in Libya continued to rise as mercenaries and militia fighters loyal to Moammar Gadhafi used deadly force to beat back a growing uprising, while rebels took control of a new military base.

At least 17 people were killed in Thursday's clashes, which included an attack by soldiers with automatic weapons in the city of Zawiya, 50 kilometres west of the capital Tripoli. The soldiers fired on a local mosque, where a witness told The Associated Press that people had gathered for a sit-in to support protesters in Tripoli.

It has been difficult to accurately gauge the number of casualties due to government-imposed media restrictions and communication black-outs. But one doctor said he saw 10 dead bodies with gunshot wounds in the head and chest lying near the mosque, as well as another 150 wounded.

Meanwhile a Libyan news agency called Qureyna reported 23 dead, with many of the injured unable to reach nearby hospitals because of gunfire from "security forces and mercenaries."

The attack prompted thousands of protesters to flood into the town's central Martyrs Square, shouting for Gadhafi to leave.

"People came to send a clear message: We are not afraid of death or your bullets," one witness told The Associated Press.

Hours later, Gadhafi called in to state television and, in comments that were broadcast across the North African country, he blamed al Qaeda leader Osama bin Laden for the uprising.

Libya's embattled ruler claimed that al Qaeda was placing "hallucinogenic pills" to teenagers in their morning coffee and besieged parents to keep better control of their teenage children to quell the protests.

"This is al Qaeda and the whole world is fighting," Gadhafi said. "You have no reason not to enjoy a peaceful life, get control of your children, keep them at home. Those young teenagers, they are carrying machine guns and they feel trigger happy."

Since Feb. 15, the 68-year-old leader has faced a massive popular uprising of opponents calling for his departure. So far, he has steadfastly vowed not to leave and said he will die a martyr on Libyan soil rather than flee his country.

After 41 years in power, Gadhafi appears to have lost control of the eastern half of the country -- despite a government crackdown in which hundreds are believed to have been killed.

Several diplomats, ministers and military officers have turned on him -- including a high-ranking cousin. Gadhafi's authority may now extend only as far as the capital of Tripoli and its surrounding towns, to the southern desert and to some less populated central areas of the country.

In his televised comments, Gadhafi expressed condolences for those killed in Zawiya on Thursday. But he also chided residents for getting involved in the rebellion.

A second attack by heavily armed militiamen aligned with Gadhafi took place Thursday east of Tripoli, at an airport near Misrata, the country's third largest city.

By the time the fighting there subsided, anti-Gadhafi factions, including mutinying military officers, had seized a nearby military air base. Seven people died in the battle, a medical official told The Associated Press. Fifty others were injured, including two children.

Jeffrey Kofman, an ABC reporter reached in Ben Gardane, Tunisia, said Tripoli and the western parts of the country, where Gadhafi is struggling to maintain control, are experiencing a "campaign of ruthless intimidation" from Gadhafi's supporters.

He said many of the mercenaries are from other countries, have no connection to Libya, and have been brought in to serve as a brutal militia. Vehicles full of armed men are roaming the streets shooting at random.

"It could be just a matter of days before Gadhafi falls. On the other hand he's a determined guy with a lot of guns and he could hang on for a long time. A lot of people could die before this is resolved," Kofman told CTV news Channel.

The situation in Tripoli is becoming desperate, Kofman said. While foreigners have been told to travel to the airport to depart the country, getting there could be fatal.

On the other hand, those who are holed up indoors are beginning to run out of food. Kofman said there are reports that the capital is out of baby formula, and mothers are feeding their children watered-down cow's milk as an alternative.

Libya's economy -- almost entirely based on its oil reserves -- is largely dependent on the estimated one million foreigners who live there, Kofman said. But many have been fleeing the unrest.

Paul Heinbecker, a former Canadian ambassador to the United Nations and a distinguished fellow at the Centre for International Governance Innovation, said the only thing that will save lives in the North African country is military intervention.

One option would be to impose a no-fly zone on Libyan airspace to prevent the country's air force from strafing or bombing protesters on the streets.

Heinbecker said there appear to be NATO airbases "within striking distance" of Libya, which would make enforcing a no-fly zone possible.

The United Nations Security Council has issued a statement on the situation. But Heinbecker described its wording as "not very strong," raising doubts about whether the decision-making body would authorize military intervention to prevent further bloodshed.

"It may not be possible to get the UN to approve military intervention," he told CTV News Channel, because member countries such as Russia and China -- which enjoy veto privileges on the Security Council -- "always worry about the precedent it might set for themselves."

With files from The Associated Press