China’s top legislative body on Tuesday unanimously passed a sweeping national security law for Hong Kong prohibiting acts of secession, subversion, terrorism and collusion with foreign forces to endanger national security.

The law, approved by the National People’s Congress Standing Committee (NPCSC), is expected to carry a maximum penalty of life in jail, reports the South China Morning Post (SCMP) newspaper.

On Sunday, the NPCSC began a special meeting fast-tracking the bill, which was passed on the last day of the three-day session.

The Post was told that the Basic Law Committee, which advises Beijing on Hong Kong’s mini-constitution, would meet “immediately after the standing committee passed the law to discuss its insertion into Annex III of the Basic Law”.

All Hong Kong delegates to the nation’s top advisory body, the Chinese People’s Political Consultative Conference, and the NPC, have been asked to attend a meeting, believed to be a briefing on the bill, at the central government’s liaison office on Tuesday afternoon.

The law is expected to come into effect on July 1, the 23rd anniversary of the city’s handover to China from British rule, according to the newspaper.

Passage of the controversial legislation came a day after China announced visa restrictions on US officials who have “behaved extremely badly” over Hong Kong.

China is moving forward on a security law that would enforce punishment over subversion and other perceived offenses in Hong Kong, which saw massive and occasionally destructive pro-democracy protests last year.

Addressing the media before China passed the law, Hong kong Chief Executive Carrie Lam on Tuesday said that any warnings from the US or other foreign governments to impose sanctions over the matter “would not scare Hong Kong”, and the city’s government would fully cooperate with Beijing on any potential countermeasures.

On May 22, China proposed a national security law for Hong Kong in response to last year’s violent pro-democracy protests that plunged the city into its deepest turmoil since it returned to Chinese rule in 1997.

The proposal, which has been condemned by the United States and Hong Kong pro-democracy figures as an assault on the city’s freedoms, was tabled on the opening day of the week-long National People’s Congress.

The law gives China the authority to curb secession, subversion, terrorism, and foreign interference, something that was observed in pro democracy protests which gripped the city last year, according to the reports.

Hong Kong has been gripped for several years by political unrest and demonstrations, which had been gaining momentum in the months leading up to the coronavirus outbreak, which led to them being suspended.

(With inputs from agency)