Two German students were arrested in Hong Kong for "unlawful assembly" linked to ongoing unrest in the city, police said .

The students, aged 22 and 23, were arrested on Thursday for suspected participation in an illegal assembly, police said.

Police did not release their identities but said the 22-year-old also faces charges of violating Hong Kong's anti-mask regulation.

In Berlin, the German foreign ministry confirmed the arrests but also did not release their identities or mention the charges.

"Our consulate in Hong Kong is providing consular care to those affected and is in contact with a lawyer and local authorities," a ministry source, according to German newspaper Bild, citing unnamed Hong Kong activists, the two are exchange students at Hong Kong's Lingnan University.

Lingnan - formerly Lingnan College - "is the only public liberal arts university in Hong Kong, "according to the university's website.

Hong Kong has seen relentless protests since June as many in the city of 7.5 million people have vented fury at eroding freedoms under Chinese rule.

Universities have become a hub for the protesters - the first time a movement characterised by its fluidity and unpredictability has coagulated in fixed locations.

Violence has escalated, and tensions have spilt out overseas, sparking friction between China and Britain, which governed Hong Kong until 1997.