Opponents of a week-long pro-democracy protest in Hong Kong stormed into demonstrators’ midst Friday, attacking them and pulling down their tents and barricades in a sudden burst of violence that prompted protest groups to cancel planned talks with the government.

The violence frightened demonstrators but also stirred anger among them at authorities’ slow response and seeming reluctance to arrest the attackers. The protesters accused the counter-demonstrators of being thugs sent by Hong Kong’s organized gangs, known as triads, and mainland Chinese authorities, who have opposed the protests and warned that their continuation would send Hong Kong into “chaos.”

The rapidly deepening mistrust could make confrontation between authorities and protesters more likely. The clashes highlighted growing polarization in Hong Kong over the protesters’ downtown occupation, which has paralyzed major sections of the city.

By the early hours of Saturday, the protesters appeared to have withstood the assault. In Mong Kok, the site of the worst violence, they reclaimed the Occupy camp they had been forced to abandon earlier in the day. Across the harbor on Hong Kong Island, thousands returned to the main protest site in Admiralty, bracing for what may come next.

It was unclear whether the simultaneous attacks at two camps were a spontaneous expression of residents’ frustration with how the protest has paralyzed large swaths of the city, or whether they were sanctioned by pro-Beijing factions. But many protesters said they were certain China had played a role.

“First they told us there would be chaos, and now they have made it happen,” said a demonstrator at one of the attacked sites who was willing to give only his last name, Fai, for fear of inviting attacks against him.

In the working-class neighborhood of Mong Kok, which has long been associated with triad gangs, student protesters were hemmed in on all sides by counter-protesters kept back only by a thin cordon of wildly outnumbered police.

The Hong Kong Federation of Students, one of the main organizations behind the protests, said the “government and police have allowed triad members to violently attack peaceful occupiers,” and said it would pull out of proposed talks with Hong Kong’s government.

In a statement, the government urged protesters to leave the area as soon as possible and suggested that the entire protest movement end its occupation. Of those who attacked protesters, it only said they should “cooperate” with authorities.

While the size of the demonstrations has noticeably diminished in recent days, video of the violence in Mong Kok sent droves of supporters into the neighborhood. Hundreds crowded around the last standing protest tent to protect the remaining demonstrators and rebuff the attackers.

“Go back to the mainland,” some shouted at the anti-protest crowd. “How much did they pay you to come out here?”

Thousands of demonstrators were still in Mong Kok by midnight, blocking the main intersection and perching atop entrances into the neighborhood’s subway station. Some swarmed the remaining protest opponents, shouting at police to arrest the “triads” and to not let them escape.

By 3 a.m. in Mong Kok, the police had lifted a cordon around the ransacked Occupy camp and let protesters reclaim it.

The outburst of violence contrasted sharply with the preceding days of peaceful and, at times curiously polite, protest by students. Their demonstrations began late last week in opposition to plans for Chinese officials to vet candidates for elections in Hong Kong, a former British colony handed over to Beijing in 1997. The showdowns soon evolved into an ideological confrontation over whether Western-tilting Hong Kong should retain some degree of autonomy from the central government — a concession Beijing appears unwilling to make.

Friday was the first day many Hong Kong residents returned to work after a two-day holiday, although the central government closed its offices, telling workers to work from home. In the morning, student demonstrators were in the midst of negotiating a time and place to meet with the government’s envoy.

Hong Kong Chief Executive Leung Chun-ying had told a late-night news conference Thursday that his government was willing to talk with the protesters but that he would not resign his post, a key demand of demonstrators.

Not long after the talks collapsed late Friday, crowds started to swell in Admiralty. While few faulted the student leaders for abandoning dialogue with a government they consider insincere, many admitted to not knowing what lies ahead. Some said they feared that the best chance for victory was now lost.

“People here are quite pragmatic and sensible,” said Arthur Lo, a 20-year-old volunteer, sitting in the occupied courtyard of Hong Kong’s main legislative assembly. “They know now that not much can realistically be won. A lot of people are a bit scared about what’s coming.”

As if on cue, word spread through announcements on megaphones that a column of police officers was advancing on the camp around 2 a.m. The protesters sprung up and donned rain gear and protective clothing. Volunteers ran frantically, distributing goggles and gas masks. Some students began wrapping their faces with plastic wrap. It proved to be a false alarm. A few protesters grumbled that the scare was a deliberate ploy by the Hong Kong government to keep them rattled.

Daniela Deane in Rome, Brian Murphy in Washington and Xu Jing in Beijing contributed to this report.