CNN  — 

Beijing imposed a wide-reaching national security law on Hong Kong on Tuesday, which many fear could be used to override existing legal processes and erode the city’s civil and political freedoms.

The stringent national security law and its 66 articles were kept secret from the public until 11pm local time, when the law officially went into effect. It dramatically broadens Beijing’s powers to investigate, prosecute and punish suspected criminals in Hong Kong.

The law was drafted behind closed doors by members of Beijing’s top lawmaking body, the National People’s Congress (NPC), bypassing Hong Kong’s own elected legislative council.

The new legislation criminalizes secession, subversion, terrorism, and collusion with foreign powers. People who are convicted of such crimes can face sentences up to life in prison.

Under the new law, the Chinese central government will establish its own law enforcement presence in Hong Kong, labeled the “Office for Safeguarding National Security.” A secretive national security committee for Hong Kong will also be established, comprised of Hong Kong government officials and an advisor appointed by the Chinese central government. According to a summary published by the Hong Kong government, this group’s work “shall not be disclosed to the public,” and “decisions by the Committee shall not be amenable to judicial review.”

Hong Kong’s Chief Executive Carrie Lam said on Tuesday evening that she welcomed the introduction of the legislation.

“Safeguarding national security is the constitutional duty of the Hong Kong Special Administrative Region (HKSAR). The HKSAR Government welcomes the passage of the national security law by the NPCSC today,” Lam said in a statement.

She repeated previous remarks, saying the law “seeks to practically and effectively prevent, curb and punish four types of crimes seriously endangering national security.”

The chief executive said that dedicated units in the Hong Kong Police Force and the Department of Justice will be responsible for enforcing the legislation.

Lam added: “I am confident that after the implementation of the national security law, the social unrest which has troubled Hong Kong people for nearly a year will be eased and stability will be restored, thereby enabling Hong Kong to start anew, focus on economic development and improve people’s livelihood.”

In a video address to the United Nations Human Rights Council in Geneva earlier on Tuesday, Lam said the law will “have no retrospective effect” – a major concern for many democracy activists in the city, especially for those facing charges relating to the protests last year.

Additionally Lam said that Hong Kong authorities would exercise jurisdiction over offenses under the law, “except in rare specified situations,” suggesting that some cases would be tried in mainland China.

The new law specifies three circumstances which allow Beijing to exercise jurisdiction over Hong Kong, including in cases involving foreign forces, serious situations that the Hong Kong government cannot handle effectively, and when national security faces a major threat. Under the legislation, Hong Kong’s Chief Executive now has the power to appoint judges to handle cases related to national security.

China’s State Council Information Office said it would will hold a press briefing on the national security law in Beijing on Wednesday morning.

The legislation has been widely criticized by opposition lawmakers in Hong Kong, human rights groups and politicians worldwide, with many saying it will cement Beijing’s direct control over the semi-autonomous city. Many worry it could be used to target political dissidents, activists, human rights lawyers and journalists amid the central government’s continuing crackdown on civil society under Chinese President Xi Jinping.

Activists have vowed to demonstrate against the law on July 1, the anniversary of the territory’s handover from British colonial rule to China in 1997. The day has become an annual day of protests in the city, but for the first time since handover police have not given permission to protesters to hold peaceful demonstrations.