The series of determined stands by rebel forces on Thursday -- especially in the strategic city of Zawiyah, near important oil resources and 30 miles from the capital, Tripoli -- presented the gravest threat yet to the Libyan leader. There, more than 100 people were killed as Colonel Gaddafi's forces turned automatic weapons on a mosque filled with rebels, a witness said. Still, residents rallied afterward to protest.
Colonel Gaddafi's evident frustration at the resistance in Zawiyah spilled out in a rant by telephone over the state television network charging that Osama bin Laden had drugged the town's youth into a rebellious frenzy.
"Al Qaeda is the one who has recruited our sons," he said in a 30-minute tirade broadcast by the network. "It is bin Laden."
Colonel Gaddafi said, "Those people who took your sons away from you and gave them drugs and said, 'Let them die' are launching a campaign over cell phones against your sons, telling them not to obey their fathers and mothers."
The violence on Thursday underscored the contrast between the character of Libya's revolution and the uprising that toppled autocrats in neighbouring Egypt and Tunisia. Unlike those Facebook-enabled youth rebellions, the insurrection here has been led by people who are more mature and who have been actively opposing the regime for some time. It started with lawyers' syndicates that have campaigned peacefully for two years for a written constitution and some semblance of a rule of law.
Fuelled now by popular anger, the help of breakaway leaders of the armed forces and some of their troops, and weapons from looted military stockpiles or smuggled across the border, the rebellion here has escalated quickly and violently in little more than a week.
At the revolt's starting point, in the eastern city of Benghazi, Fathi Terbil, 39, the human rights lawyer whose detention first ignited the protests, drew a map of rebel-held territory in striking distance of Tripoli. "It is only a matter of days," he said.
A turning point in the uprising's evolution was arguably the defection of the interior minister, Abdel Fattah Younes al-Abidi, an army general who had been a close ally of Colonel Gaddafi.
The break by General Abidi, who has family roots near the revolt's eastern origins, encouraged other disaffected police, military and state security personnel to change sides as well. "We are hoping to use his experience," said Mr Terbil, who some called the linchpin of the revolt.
Opposition figures in rebel-held cities like Benghazi have been appearing on cable news channels promising that opponents of Colonel Gaddafi are heading toward Tripoli to bolster the resistance there. Their ability to carry out those assertions remains to be seen.
In parts of the country, the revolutionaries, as they call themselves, appear to have access to potentially large stores of weapons, including small arms and heavy artillery, automatic weapons smuggled from the Egyptian border and rocket-propelled grenades taken from army bases, like the Kabila in Benghazi.
Tawfik al-Shohiby, one of the rebels, said that in the early days of the revolt, one of his relatives bought $75,000 in automatic weapons from arms dealers on the Egyptian border and distributed them to citizens' groups in towns like Bayda.
So far, at least in the east, many of the weapons appear to be held in storage to defend against a future attempt by Colonel Gaddafi's forces to retake the territory. At a former security services building in Benghazi on Thursday, men in fatigues prepared to transport anti-aircraft and antitank weapons to what one said was a storage depot.
Like their counterparts in Tunisia and Egypt, the rebels in Libya have shown tech-savvy guile in circumventing government efforts to block their communication. To sidestep the government's blocking of the Internet and curbing of cell phone access, for example, some of the more active anti-government protesters distribute flash drives and CDs with videos of the fighting to friends in other towns and to journalists.
Mr Shohiby began helping lead an effort this week to shuttle foreign journalists from the Egyptian border to towns across eastern Libya.
His network of contacts was built on the Internet: not on Facebook, but on a popular soccer Web site. "I have friends from east to west, north to south," he said. "There are two guys in Sabha, one in Zawiyah, three friends in Misurata, for example," he said, speaking of towns that were the scenes of some of the clashes on Thursday.
Still, Mohammed Ali Abdallah, deputy secretary general of an opposition group in exile, The National Front for the Salvation of Libya, said the Libyan government's fierce crackdown made organizing the spontaneous uprising a continuing challenge, especially in heavily guarded Tripoli.
"It is almost like hit and runs," he said. "There are almost no ways that those young guys can organize themselves. You can't talk on a mobile phone, and if five people get together in the street they get shot."
Nonetheless, protesters in Tripoli were calling for a massive demonstration on Friday after noon prayers, residents of the city and those fleeing the country said. In recent days, witnesses said, Colonel Gaddafi appears to have pulled many of his militiamen and mercenaries back toward the capital to prepare for its defence.
But despite the encroaching insurrection, Colonel Gaddafi appeared determined on Thursday to put on a show of strength and national unity, a stark turnabout from his approach so far.
Since the start of the uprising, his government had shut out all foreign journalists, cut off communications and even confiscated mobile phone chips, and other devices that might contain pictures, at the border from people fleeing the country. Libya had warned that reporters who entered the country illegally risked arrest and could be deemed collaborators of Al Qaeda.
But on Thursday Colonel Gaddafi's son and heir apparent Seif al-Islam el-Gaddafi announced on television that the government would allow teams of journalists to visit Tripoli. Witnesses said preparations for the visit were already under way.
The soldiers and mercenaries who had previously roamed the streets had largely disappeared by the late afternoon, leaving only traffic police officers, and the capital's central Green Square -- the scene of violent clashes earlier this week -- had been cleaned up. Two banners, in English, now adorned the square. "Al Jazeera, BBC, don't spread lies that reflect other's wishful thinking," one read. The other: "Family members talk but never fight between each other."
But the rebels' unexpected strength was undeniable on Thursday as they appeared to hold or contest several towns close to Colonel Gaddafi's stronghold in Tripoli in the face of a coordinated push by his mercenaries and security forces.
In Misurata, 130 miles the east of the capital, Colonel Gaddafi's forces struck at rebels guarding the airport with rocket-propelled grenades and mortar shells, The Associated Press reported. But the rebels seized an anti-aircraft gun used by the militias and turned it against them.
In Zuwarah, 75 miles west of the capital, the police and security forces had pulled out and a "people's committee" was controlling the city, several people who had fled across the border reported. "The people are taking care of their own business," said Basem Shams, 26, a fisherman.
In Sabratha, 50 miles west of the capital, witnesses reported that the police headquarters and offices of Colonel Gaddafi's revolutionary committees were all in smouldering ruins. "We are not afraid; we are watching," said a doctor by telephone from Sabratha. "What I am sure about, is that change is coming."
In Zawiyah, an envoy from Colonel Gaddafi had reportedly arrived to warn rebels on Wednesday: "Either leave or you will see a massacre," one resident told The Associated Press.
About 5 a.m. Thursday, Colonel Gaddafi's forces fulfilled their threat. Witnesses said a force that included about 60 foreign mercenaries assaulted a central mosque where some of the roughly 2,000 protesters had sought refuge. One witness said the protesters were armed mainly with rifles, sticks and knives, but after four hours of fighting they managed to hold the square.
About 100 people were killed and 200 others wounded, this witness said. During a telephone interview with him, a voice could be heard over a loudspeaker in the background telling the crowd, in an area known as Martyrs Square, not to be afraid.
"People came to send a clear message: We are not afraid of death or your bullets," one resident told The A.P. "This regime will regret it. History will not forgive them."
Meanwhile, the violence sowed concern across the region and beyond. President Obama spoke Thursday, in separate calls, with President Nicolas Sarkozy of France and the prime ministers of Britain and Italy, David Cameron and Silvio Berlusconi.
The White House said the leaders expressed "deep concern" over the Libyan government's use of force and discussed possible responses, without specifying what steps they were prepared to take.