The UK has joined Canada, Australia and the US to express “serious concern” over the mass arrests of pro-democracy politicians and activists in Hong Kong.

A joint statement issued by the four countries came after Foreign Secretary Dominic Raab said Wednesday’s detention of more than 50 activists represented a “grievous attack” on the rights and freedoms of Hong Kong under the Sino British Joint Declaration.

Mr Raab, US Secretary of State Mike Pompeo and Australian and Canadian foreign ministers Marise Payne and Francois-Philippe Champagne said in a joint statement the National Security Law had “curtailed the rights and freedoms of the people of Hong Kong”.

“It is clear that the National Security Law is being used to eliminate dissent and opposing political views,” they said.

Detainees included those involved in running unofficial “primaries” to select opposition candidates for elections to the Legislative Council which had been postponed from 2020 due to coronavirus.

Hong Kong security minister John Lee said the operation had targeted “active elements” suspected of involvement in the crime of “overthrowing, or interfering (and) seriously destroying” the pro-Beijing administration in the execution of its legal duties.

He said they were suspected of trying to paralyse the government through their plans to gain a majority of the seats in the legislature and force out chief executive Carrie Lam.

The arrests marked the largest move against the pro-democracy movement since the controversial national security law was imposed by Beijing last June in a clampdown on protests in the territory.

The allies’ statement said: “We call on the Hong Kong and Chinese central authorities to respect the legally guaranteed rights and freedoms of the people of Hong Kong without fear of arrest and detention.

“It is crucial that the postponed Legislative Council elections in September proceed in a fair way that includes candidates representing a range of political opinions.”

Mr Raab on Wednesday said the UK would not “turn our backs on the people of Hong Kong” and would continue to offer those with British National (Overseas) status the right to live and work in the UK.

The Joint Declaration was supposed to guarantee Hong Kong a high degree of autonomy for 50 years following the handover of the territory by Britain to China in 1997.

Following the outbreak of protests in 2019, Chinese state media dismissed the treaty as a “historical document” which had been “invalid and expired” for a long time.