China's Parliament has passed a ruling that effectively bars two Hong Kong pro-independence politicians from taking office, Beijing's most direct intervention in the territory's legal and political system since the 1997 handover.
The National People's Congress (NPC) in Beijing ruled on Monday that lawmakers must swear allegiance to Hong Kong as part of China, and that candidates would be disqualified if they changed the wording of their oath of office, or if they failed to take it in a sincere and solemn manner.
The prospect of the ruling had sparked protests in the former British colony on Sunday. Foreign diplomats were watching closely, stressing the importance of the rule of the law to the city's international reputation.
While the controversial decision effectively bars the two pro-independence Hong Kong politicians from being sworn in, a court in the Chinese-ruled city must still rule on the case, taking Beijing's decision into consideration.
The promotion of independence has long been taboo in Hong Kong, governed under a "one country, two systems" principle since 1997, amid fears in Beijing it could spread among other activists and challenge the central government's rule.
"The nature of Hong Kong independence is to split the country. It seriously violates the 'one country, two systems' policy," said Li Fei, chairman of the parliament's Basic Law Committee.
"The central government is highly concerned about the grave dangers the Hong Kong independence forces bring to the country and to Hong Kong," Mr Fei said.
Hong Kong leader Leung Chun-ying said the city's government would fully implement China's interpretation of the mini-constitution, although it was not immediately clear if that meant the pro-independence pair were already disqualified from office.
The move came after pro-independence politicians Yau Wai-ching, 25, and Baggio Leung, 30, pledged allegiance to the "Hong Kong nation" and displayed a banner declaring "Hong Kong is not China" during a swearing-in ceremony for the city's legislative council in October.
Simon Young, a professor at Hong Kong University's law school, said he was still evaluating the ruling but it did seem to bar Mr Leung and Ms Wai-ching from taking office.
"I do worry we are only going to see more interpretations, and attempts by the NPC to flesh out local laws, if they really want to stop the separatists," Mr Young said, referring to China's parliament.
Leading members of China's parliament said on Saturday the pro-independence pair had damaged the territory's rule of law and posed a grave threat to China's sovereignty and security.
Britain returned Hong Kong to Chinese control in 1997 under a "one country, two systems" formula that gave the territory wide-ranging autonomy, including judicial freedom guided by a mini-constitution called the Basic Law.
The Basic Law grants China's NPC a power of interpretation above Hong Kong's highest court. While it has made four other rulings since the 1997 handover, this ruling is its first move to preempt an ongoing Hong Kong court case.
Hong Kong justice secretary Rimsky Yuen said on Monday he still believed the oath-taking controversy could be resolved locally, but he also had every confidence that the city's judiciary would uphold the rule of law.
Beijing's decision came before a Hong Kong court made its ruling and represented some of the worst privately held fears of senior judges and some government officials in Hong Kong, according to sources close to them.
The move was expected to enrage Hong Kong democracy activists further, a day after hundreds of demonstrators clashed with police in running battles around China's representative office in Hong Kong.
The scenes on Sunday night were reminiscent of pro-democracy protests in late 2014 that paralysed parts of the Asian financial centre and posed one of the greatest political challenges to the central government in Beijing in decades.
"This incident shows us the Basic Law is a handicapped legal document and the so-called mini-constitution can be amended and controlled by the Chinese Communist Party at will," said Joshua Wong, 20, one of the leaders of the 2014 protests.
James To, a lawmaker with the Democratic Party, said the central government had undermined Hong Kong's judicial process.
"In future, people's confidence in 'one country, two systems' will worsen," Mr To said.