BEIRUT — Thousands of Syrians took to the streets in virtually every region yesterday in what appeared to be a sign of new momentum and a potentially dangerous turn in the nine-week uprising. Activists said security forces killed at least 26 people and wounded hundreds.

The resilience of the protests seemed to surprise even the activists themselves. The message delivered at many of the demonstrations, from Damascus, the capital, to the distant east, to towns that had been the target of ferocious repression, was that the killing of hundreds and detention of thousands would not stifle opposition to four decades of authoritarian rule.

“No dialogue with tanks and soldiers,’’ went one slogan.

There were ominous signs, too, of communal strife and outbreaks of violence that are testing a government that has built its legitimacy on the promise of stability. The unrest has exacerbated sectarian tensions in a country with a Sunni Muslim majority and a mosaic of ethnic and religious minorities: Christians, Kurds, and Alawites and other heterodox Muslim sects.

Some of the worst unrest has erupted along the Sunni-Alawite fault lines in the cities of Baniyas, Latakia, and Homs, and there are reports, though unconfirmed, of assassinations of security personnel and sectarian bloodletting.

To minorities, the middle class, and the business elite, the government has warned that it is “us or chaos.’’ But, analyst based in Damascus argued, repression may be intensifying instability.

“If you can’t restore stability, then it becomes ‘us and chaos,’ ’’ said the analyst, who asked not to be identified given the danger of the situation.

This week the Obama administration ratcheted up pressure on President Bashar Assad, whom US officials had described as recently as March as a reformer. The administration imposed sanctions on him and six other senior officials, and European officials have warned that they may impose more next week. In Obama’s Middle East policy address Thursday, he used some of his harshest language yet about the crackdown, saying that Assad had a choice.

“He can lead that transition, or get out of the way,’’ Obama said.

By all accounts, the government signaled its intention to persist with the crackdown, even as it tentatively offered to talk with some opposition figures. It blamed armed gangs for the violence yesterday. Activists said the government deployed troops against yet another city, Ma’arrat an Nu’man, and carried out another round of arrests in Baniyas.

Across the country, there were signs of disorder in the response of the notoriously unaccountable security forces. While some troops used water cannons and fired in the air, others shot at protesters in places like Homs, the city in central Syria that is emerging as a locus of the challenge to Assad’s authority, and Ma’arrat an Nu’man, a town to the north that, like Homs, is perched in a region of Sunni Muslims and minority Alawites.

In a town on the border with Iraq, residents said protesters burned a municipal building and stormed a jail, freeing detainees. In the most restive neighborhood of Homs, activists said they raised a flag predating the Assad family’s rule.

Despite a military assault on Baniyas, along the Mediterranean coast, thousands returned to the streets there, in a sign that if the tanks were withdrawn, crowds would find a way to organize more protests.

Wissam Tarif, executive director of Insan, a Syrian human rights group, said he had interviewed young men tortured just days ago. One of them, who had his fingernails pulled out, had taken a lead in the protests yesterday in Baniyas.

“They can’t make people afraid anymore,’’ he said. “This is evidence, but they just don’t get it. The crackdown is not working, and it’s becoming personal.’’

Syrian officials have maintained that the government has the upper hand, suggesting that they believed the crackdown could eventually bring quiet. Assad himself said in an interview with a Syrian newspaper this week that the unrest would soon come to an end.

But opposition figures and activists warned that the stalemate between a state bent on repression and protests that remain relatively small but remarkably persistent could prove dangerous, as sectarian tensions grow and reports proliferate of some protesters resorting to arms. Some insisted that time was, in fact, running out.

“The longer this crisis goes on, the longer it takes the government to recognize the legitimacy of the protesters and their demands, the bigger the gap between the two will become,’’ said Louay Hussein, an opposition figure who has met with government officials.

© Copyright 2011 Globe Newspaper Company.