China has said it reserves “the right to take corresponding measures” if the UK pushes forward with its plan to give three million Hong Kong residents the right to settle in the country.

Boris Johnson accused Beijing of a “clear and serious breach” of its treaty with Britain by imposing a much-criticised national security law on the territory.

The Prime Minister said he would introduce a route for people with British National (Overseas) (BNO) status to apply for visas to live and work in the UK and apply for citizenship.

In response, the Chinese Embassy in the UK said such a move would be in breach of “international law and basic norms governing international relations”.

A statement said: “We firmly oppose this and reserve the right to take corresponding measures.

“We urge the British side to view objectively and fairly the national security legislation for Hong Kong, respect China’s position and concerns, refrain from interfering in Hong Kong affairs in any way.”

Downing Street stood firm despite the prospect of retaliatory measures from Beijing.

“We were very clear in the action we would take if China imposed this law. We will now do exactly what we said we would do,” the Prime Minister’s official spokesman said.

Final details of the scheme for BNO citizens will be set out by the Home Office “in the coming months”, the spokesman added.

On Wednesday, the Foreign Office summoned Chinese ambassador Liu Xiaoming to a meeting with permanent under-secretary Sir Simon McDonald.

Sir Simon said the imposition of the legislation breaches the Sino-British Joint Declaration which aimed to smooth the transition when the territory was handed back to China in 1997.

This came after Foreign Secretary Dominic Raab accused Beijing of a “grave and deeply disturbing” breach of the treaty which “threatens the strangulation” of Hong Kong’s freedoms.

The security law in Hong Kong – which came into effect on Tuesday night – makes activities deemed subversive or secessionist punishable by imprisonment, and is seen as targeting anti-government demonstrators.

Around 370 people were arrested on Wednesday including a 24-year-old man accused of stabbing a police officer during a protest who was arrested on a London-bound flight before it took off.

Mr Raab told MPs the “bespoke” new arrangement to be implemented in the coming months would grant BNOs five years’ limited leave to remain in the UK with the ability to live and work.

They would then be eligible to apply for settled status and would be able to apply for citizenship after 12 months with that status.

Hong Kong China
Police detain protesters against the new security law during a march marking the anniversary of the Hong Kong handover from Britain to China (Vincent Vu/AP)

As of February, there were nearly 350,000 BNO passport holders, while the Government estimates there are around 2.9 million BNOs living in Hong Kong.

However, the Foreign Secretary later said “only a proportion” would be likely to take up the new status.

He also said that if Beijing tried to stop people with British National (Overseas) status from leaving Hong Kong, there would be little that could be done by the UK.

Charles Parton, a senior associate fellow at the Royal United Services Institute with nearly 40 years of experience in diplomacy, said the UK is likely to be in the “diplomatic doghouse”.

As well as being blocked from high-level political meetings, Mr Parton said the UK could face threats to investment, trade and exports from China, but stressed the impact would not be as bad as the threats may suggest.

Mr Parton told the PA news agency: “The Chinese need us as much as we need them. I think we need to hold our nerve, be mature and not confrontational.”

He said China could tell Hong Kong’s government not to issue the documents needed to prove BNO status or try to prevent people from flying, but this would be “stirring up a hornet’s nest”.