China on Thursday passed a new national security law for Hong Kong set to rein in the semi-autonomous region after months of protests last year.

At the concluding session of the National People's Congress, China’s top legislative body, the draft of the Hong Kong national security legislation was formally adopted.

Hong Kong, a semi-autonomous region under China since 1997, last year witnessed protests against the Carrie Lam administration’s move to legalize extradition to mainland China.

The new law was proposed and brought forward last week at the NPC by Wang Chen, vice-chairman of the National People's Congress Standing Committee.

He had said the protests against Lam’s government "seriously challenged the bottom line of the principle of one country, two systems, harmed the rule of law, and threatened national sovereignty, security and development interests."

"Law-based and forceful measures must be taken to prevent, stop, and punish such activities," Wang said, citing Article 23 of the Hong Kong Basic Law, which says the region must "prohibit any act of treason, secession, sedition and subversion against the Central People's Government (CPG)."

The new law would make it a crime to undermine Beijing's authority in the territory.

"More than 20 years after Hong Kong's return, however, relevant laws have yet to materialize due to the sabotage and obstruction by those trying to sow trouble in Hong Kong and China at large, as well as external hostile forces," Wang said.