China is preventing two elected pro-independence lawmakers in Hong Kong from taking their seats in the city's legislature because they deliberately misread their oaths of office.

The Hong Kong lawmakers included expletives and derogatory comments in their swearing-in ceremony last month, while displaying a "Hong Kong is Not China" flag.

The National People's Congress Standing Committee in Beijing published its ruling Monday. The committee said talk of independence for Hong Kong is intended to "divide the country" and severely harms the country's unity, territorial sovereignty and national security.

Leung Chun-ying, Hong Kong's chief executive, said he and the city's government would fully implement the Chinese ruling.

A Hong Kong court decision on the case is pending.

The elected officials have not been allowed to take their seats.

The ruling comes amid fear that China is tightening its grip on semi-autonomous Hong Kong.

The Chinese government has criticized Hong Kong independence advocates as separatists and belittled them as a fringe minority.

On Sunday, Hong Kong police used pepper spray on demonstrators who took to the streets ahead of the ruling to demand that China stay out of the city's affairs.

Hong Kong is a former British colony which returned to Chinese rule in 1997 under a promise of "one country, two systems" for 50 years.