Britain's Supreme Court on Friday suggested its judges could stop serving in Hong Kong unless judicial independence and the rule of law were guaranteed in the city.
Two British judges have served on the Hong Kong Court of Final Appeal since 1997 as part of the agreement that saw control handed over to China.
The Court of Final Appeal also includes retired judges from Britain and from other common law jurisdictions, including Australia and Canada.
But China's introduction of a controversial new security law targeting acts of subversion, secession, terrorism and foreign collusion has caused concern among Western powers.
UK Supreme Court president Robert Reed said the Hong Kong court had ruled on civil and commercial cases, as well as those about rights of protest and free speech.
"The new security law contains a number of provisions which give rise to concerns. Its effect will depend upon how it is applied in practice. That remains to be seen," he said.
Reed said he was sure Hong Kong judges would "do their utmost" to guarantee judicial independence and the rule of law, and said they had the backing of their UK counterparts.
"[The Supreme Court] will continue to assess the position in Hong Kong as it develops, in discussion with the UK government," he added in a statement.
"Whether judges of the Supreme Court can continue to serve as judges in Hong Kong will depend on whether such service remains compatible with judicial independence and the rule of law."
Reed is currently the only serving British judge provided under the agreement following Brenda Hale's recent retirement from the Supreme Court.
But he has not been scheduled to sit this year.
Britain has angered Beijing by offering visas to millions of Hong Kong residents, along with a possible route to citizenship in response to China's introduction of the security law on the territory.
Beijing, already angered by Britain's blocking of telecoms giant Huawei from Britain's 5G network, has vowed to take unspecified "corresponding measures".
About 350,000 people in Hong Kong currently hold British National (Overseas) passports, which allow visa-free access to Britain for up to six months, Johnson wrote.
Another 2.5 million people would be eligible to apply for one.