Chinese lawmakers on Tuesday voted to adopt the "landmark" law on safeguarding national security in Hong Kong.
The law was passed unanimously at the 20th session of the Standing Committee of the 13th National People's Congress (NPC), China's top legislature.
President Xi Jinping signed a presidential order to promulgate the law, which goes into effect on the date of promulgation.
With 66 articles in six chapters, the law clearly defines the duties and government bodies of the HKSAR for safeguarding national security and four categories of offences -- secession, subversion, terrorist activities, and collusion with a foreign country or external elements to endanger national security -- and their corresponding penalties.
According to the law, the central government will set up an office in the HKSAR for safeguarding national security.
The HKSAR will establish a committee for safeguarding national security, which is under the supervision of and accountable to the central government. To be chaired by the HKSAR chief executive, the committee shall have a national security adviser designated by the central government. The Hong Kong police force will also set up a department for safeguarding national security, according to the law.
After the law was passed, the NPC Standing Committee consulted its HKSAR Basic Law Committee and the HKSAR government, and adopted on Tuesday afternoon, by a unanimous vote, a decision to list the law in Annex III to the HKSAR Basic Law.
The newly-adopted decision stipulates that the law shall be applied locally in the HKSAR by way of promulgation by the region.
HKSAR Chief Executive Carrie Lam said in a statement that the HKSAR government welcomes the passage of the law.
"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," she said.
Addressing the closing meeting of the NPC Standing Committee session, Li Zhanshu, chairman of the NPC Standing Committee, said the unanimous passage of the law and the decision has reflected the common will of the Chinese people including Hong Kong compatriots.
Stressing that national security, social stability and the order of rule of law are the premises of the development of Hong Kong, Li said the legislation represents the aspirations of the people and an irresistible trend of the times.
In a statement, the Hong Kong and Macao Affairs Office of the State Council voiced firm support for the law, calling it a "milestone" event that will usher in a turning point for Hong Kong to end chaos and bring back order.
Nearly 2.93 million Hong Kong residents earlier signed a petition in support of the national security legislation during an eight-day campaign starting May 24.
The Hong Kong and Macao Affairs Office of the State Council said in its statement that for a tiny number of people endangering national security, the law will be a "sharp sword" hanging over their heads.
But for the vast majority of Hong Kong residents including foreigners in Hong Kong, the law will be a "guardian" that protects their rights, freedoms and peaceful life, said the office.
According to the law, people convicted of the national security crimes could face up to life imprisonment.
Convicted criminals will be disqualified from running for public office, and people in public office who are found guilty of the crimes will be removed from their posts.