The decision also says lawmakers will be held liable if they violate their oaths, but it provides no guidance on who has the power to determine whether a lawmaker is in breach or what the punishment should be. The fear is that this will inject a degree of arbitrariness into a system that is based on rules underpinned by centuries of precedent under British common law.

“Whether it would affect my seat is secondary,” Nathan Law, 23, a new member of the Legislative Council who advocates greater self-determination for Hong Kong, said of the ruling by Beijing. “What’s most important is that the interpretation is vesting so much power in a person to decide whether someone is sincere and allegiant enough to take office, and there is no checks-and-balance against that person.”

The Basic Law says little about oaths, only that officials must swear allegiance “in accordance with law” to the “Hong Kong Special Administrative Region of the People’s Republic of China.”

Two politicians elected to the legislature in September, Sixtus Leung, 30, known as Baggio, and Yau Wai-ching, 25, set off the legal case by changing the wording of their oaths, replacing the word China with “Chee-na,” a term that many find offensive and that was used by Japan during World War II, when it occupied much of China, including Hong Kong. Ms. Yau also inserted an obscenity.

The Chinese government condemned the pair and labeled them threats to national security for their advocacy of independence, and officials in Beijing left little doubt in announcing Monday’s decision that it was intended to keep them out of office.

Li Fei, the chairman of China’s parliamentary committee on the Basic Law, compared Mr. Leung and Ms. Yau, and their supporters, to traitors espousing a “fascist” line. “There is a great patriotic tradition in the Chinese nation,” he said. “All traitors and those who sell out their countries will come to no good end.”

He added that the government’s stance “will not be ambiguous or lenient.”

The United States, on the eve of its own presidential election, urged China not to undermine the “one country, two systems” formula that has protected basic civil liberties in Hong Kong.