Police fired tear gas and rubber bullets while protesters hurled rocks during clashes in a rural Hong Kong town on Saturday, as several thousand activists gathered to protest an attack by suspected triad gang members at a train station last weekend.

Protesters wearing black streamed through Yuen Long, even though police refused to grant permission for the march, citing risks of confrontations between demonstrators and local residents.

For the protesters, it was a show of defiance against the white-clad assailants said to have beaten dozens of people last Sunday night, including some demonstrators heading home after the latest mass protest in the summer-long pro-democracy movement.

Police said some of the attackers at the train station were connected to triad gangs and others were villagers who live in the area.

The streets of Yuen Long became a sea of umbrellas as the march began Saturday afternoon. A symbol going back to the Occupy Central protests that shook Hong Kong in 2014, umbrellas have become tools to help protesters conceal their identities from police cameras as well as shields against tear gas and pepper spray. Some also wore masks to obscure their faces.

"Hong Kong police know the law and break the law," protesters chanted as they made their way through the streets.

Max Chung Kin-ping, one of the rally's organizers, said there were 288,000 participants. The police had yet to release their turnout figure, which is generally lower than organizers' estimates.

Protesters built barricades out of street furniture and umbrellas, creating multiple standoffs during which rocks and bottles were thrown.

Police, widely criticized for failing to better protect the public from last weekend's attack, responded with tear gas as

they pushed activists into retreat as it grew dark.

"Many people want to go but some will stay. There is still a lot of anger. I'm not sure which way it will go. Nam Pin Wai [village] could be a target," said a man going by Kenneth, 27, as he retreated from one of the front lines.

Less than three hours after the start of the march Saturday, police fired tear gas to try to disperse the crowd.

The government issued a statement at around the same time, warning police would move in to break up the demonstration.

The statement said some protesters were "holding iron poles, self-made shields and even removing fences from roads," and some had surrounded and vandalized a police vehicle with officers inside.

'Stop charging or we use force': police

As the demonstration rolled into the evening, officers in riot gear faced off with protesters using wooden sheets as shields.

Live footage from broadcaster RTHK showed protesters on one street forcing back riot police by throwing umbrellas and waving rods at them. On another street, officers repeatedly raised warnings and fired tear gas at masked demonstrators who were standing their ground.

Soon afterward, many of the protesters dispersed, but others stayed put. A group of officers appeared with batons and held up banners that read, "Stop charging or we use force." At least one woman was knocked down when police used the rods.

Later in the evening, protesters encircled a smashed-up black car. The windows of the car were shattered and its body was covered with posters denouncing the police. It was not immediately clear who owns the vehicle or who destroyed it.

Trains halt usual stops

Last Sunday, about 100 white-shirted men stormed the Yuen Long mass-transit station hours after protesters marched through central Hong Kong, and defaced China's Liaison Office — the main symbol of Beijing's authority over the former British colony.

On Saturday, the city's public transit network announced its trains would not be making their usual stops in Yuen Long. Several area businesses and public facilities were closed in anticipation of the march. Service at a nursing centre was temporarily suspended and sports venues shut down early.

Hong Kong's government issued a statement after the march began that said police were "concerned about possible deterioration of the situation.

"Police appeal to members of the public to stay calm and leave the area as soon as possible as a chaotic scene may ensue within a short period of time," the statement said.

A few hours before the start of the march, a man was arrested in Yuen Long for injuring someone with a knife, police said.

Massive demonstrations began in Hong Kong early last month against an extradition bill that would have allowed suspects to face trial in mainland China, where critics say their rights would be compromised. The bill was eventually suspended, but protesters' demands have grown to include direct elections, the dissolution of the current legislature and an investigation into alleged police brutality in the Chinese territory.

The streets of Yuen Long became a sea of umbrellas, tools to help protesters conceal their identities from police cameras as well as shields against tear gas and pepper spray. (The Associated Press)

Hong Kong was returned to China in 1997 under the framework of "one country, two systems." The arrangement promises the city certain democratic freedoms that are not afforded mainland citizens, but some residents say these liberties have been steadily eroded in recent years after the arrests of booksellers and democracy activists.

A distrust of China's Communist Party-led central government in Beijing has undergirded the protests this summer. After last Sunday's march, a group of protesters vandalized Hong Kong's Liaison Office, which represents the mainland government. They spray painted the building's surveillance cameras, and threw eggs and black ink at the Chinese national emblem, an act Beijing has vehemently condemned.

In response to the police's objection to Saturday's march in Yuen Long, protesters have cheekily labelled the procession a "shopping trip," as well as a memorial service for former Chinese premier Li Peng, who died on Monday. Li was a hard-liner best known for announcing martial law during the 1989 Tiananmen Square protests that ended in bloodshed.

Some Yuen Long residents stood outside Saturday with signs warning protesters not to enter. For their part, demonstrators pasted calls for democracy on sticky notes around the area.