A British lawyer who is prosecuting a case against pro-democracy activists in Hong Kong has been labelled a “mercenary” by Dominic Raab, the UK’s foreign secretary, as controversy over his appointment grows.

David Perry, a QC, was hired by the authorities to prosecute nine activists for unlawful assembly. Mr Raab, who was a human rights lawyer before becoming an MP, said he could not understand how anyone could take on such a case “in good conscience”.

Allies of Mr Perry have said he is acting under the “cab rank” principle under which barristers take cases as they come up.

But Mr Raab told the BBC The Andrew Marr Show that a barrister could resist such a case “under the bar code of ethics”, adding: “From Beijing’s point of view, this would be a serious PR coup.”

The Hong Kong government is prosecuting a group of leading pro-democracy figures including media magnate Jimmy Lai, 73, and the city's “father of democracy” Martin Lee, 82. The trial, which begins on February 16 in the district court, is over accusations the group were involved in organising unlawful assemblies during the 2019 Hong Kong protests.

The protests began in opposition to a law that would for the first time have allowed criminal suspects to be transferred to mainland China for trial. They then widened to include concerns Beijing was eroding the autonomy granted to the territory at the 1997 handover from the UK to China.

Beijing responded by introducing a harsh national security law last year that has led to a crackdown on pro-democracy opposition by police. Albert Ho, a veteran democrat and lawyer who is also being prosecuted in the case, said Mr Perry’s participation in the trial was “shameful”.

“The prosecution is only minded to secure conviction of all the pro-democracy activists at any costs,” he told the Financial Times.Mr Lee helped to write the legal framework that would underpin the future governance of the Asian financial hub, while Mr Lai's campaigning pro-democracy tabloid newspaper, Apple Daily, has angered local authorities. Mr Perry has previously acted for the Hong Kong government, including in the 2017 corruption trial of ex-Hong Kong leader Donald Tsang.

After being hired again by the government, there has been local speculation about how Mr Perry would enter Hong Kong before February 16. The Chinese territory has suspended commercial flights from the UK because of a new coronavirus strain spreading in Britain.

Hong Kong has also introduced a compulsory 21-day hotel quarantine and banned most non-residents from entry.

Mr Raab, who has stepped up his criticism of Beijing in recent days, said on Sunday that it was “disgraceful” for the Chinese embassy in the US to claim that its government’s activities in Xinjiang province were “eradicating extremism” among the local population.