A mob of masked men armed with batons stormed a train station in the Hong Kong district of Yuen Long on Sunday.
Footage posted on social media showed the men, all in white T-shirts, violently attacking people on platforms and inside train carriages.
At least 36 people were injured in the violence, local media report.
The mob attack followed the latest pro-democracy rally in the centre of Hong Kong, where riot police had fired tear gas and rubber bullets at protesters.
It is unclear who the mob were or what the motives for the attack were.
In a statement, the government said that in Yuen Long “some people congregated at the platforms of the MTR station and train compartments, attacking commuters”.
“This is absolutely unacceptable to Hong Kong as a society that observes the rule of law. The SAR [Special Administrative Region] Government strongly condemns any violence and will seriously take enforcement actions.”
Hong Kong Police also said: “Some people attacked commuters at the platforms of the Yuen Long MTR station and train compartments, resulting in multiple injuries.”
The mob stormed Yuen Long MTR station at about 22:30 local time (14:30 GMT), hours after clashes betrween protestors and police in the Sheung Wan area earlier in the day.
Yuen Long is a more remote district of Hong Kong, and is far away from the site of the main pro-democracy protests.
What happened at the rally earlier on Sunday?
Riot police fired tear gas and rubber bullets at protesters in Hong Kong at a large pro-democracy rally, and charged demonstrators who threw objects at police lines.
The protest route was altered with protesters told to stop at Wan Chai rather than Central, where the key government offices are located.
Some 4,000 police officers were deployed.
Bonnie Leung from the Civil Human Rights Front urged Hong Kong leader Carrie Lam to “stop turning a deaf ear to the Hong Kong people’s demands”.
Organisers of Sunday’s protest say more than 430,000 people took part but police put the figure at 138,000.
Mass protests have been held for weeks, initially over an extradition deal with mainland China but now covering other issues on democracy in Hong Kong.
Late on Sunday, riot police equipped with masks and shields were seen swarming towards protesters close to a ferry terminal on the main island.
Images outside of the liaison office, China’s central government building, show signs covered in graffiti. One of the slogans reads: “You taught us peaceful marches are useless.”
Some protesters also covered the CCTV cameras outside a police station with spray paint.
The latest rally was put on edge after a huge haul of explosives was found along with protest leaflets.
On Saturday, a counter-rally in support of the police and against protest violence drew tens of thousands.
Tear-gas, rubber bullets, the trashing of parliament by protesters and sporadic clashes have created the worst crisis in the territory’s recent history.
The Hong Kong government has since suspended trying to pursue the extradition bill.
The former British colony is part of China but run under a “one country, two systems” arrangement that guarantees it a level of autonomy. It has its own judiciary, and a legal system that is independent from mainland China.
What was Saturday’s counter-protest about?
It took place in the central Hong Kong district of Admiralty on Saturday, attracting 103,000 people according to police, but more than 300,000 according to organisers.
It was themed “Safeguard Hong Kong”. The South China Morning Post said attendees included locals, mainland immigrants, members of ethnic minorities and visitors from across the border.
The rally, which won coverage in Chinese state media, focused on support for the police and condemnation of the violence that has marred pro-democracy rallies.
Views differed, however, on how the Hong Kong government had tackled the crisis.
How did this wave of protests start?
They were sparked by the proposed extradition bill that would have allowed people to be sent to China for trial.
Critics said it would undermine Hong Kong’s judicial independence and could be used to target those who spoke out against the Chinese government.
The Hong Kong government suspended the bill, but this has not halted the demonstrations, which now reflect broader demands for democratic reform and concerns that freedoms are being eroded.
Hong Kong protests: Armed mob storms Yuen Long station