BEIJING - Chinese President Xi Jinping on Tuesday (June 30) signed into effect a Hong Kong national security law, which has been inserted into the city's mini constitution, state media reported.
The law takes effect immediately.
It effectively bans the sort of protests that has rocked the city for most of the past year, criminalising subversion and colluding with foreign forces.
"The (National People's Congress Standing Committee) meeting passed the (Hong Kong National Security Law), and President Xi Jinping signed Presidential Decree No. 49 for promulgation; the committee voted to insert the law into Annex III of the Basic Law of the Hong Kong Special Administrative Region," said a report from the official Xinhua news agency.
For the few who try to endanger the security of Hong Kong, the law will be a "sword hanging over their heads", said the Hong Kong and Macau Affairs Office in Beijing, adding that it would be a "protective talisman" for those who want peace and stability in the city.
"Do not underestimate the ability of Central and (Hong Kong) agencies to enforce the law strictly," Beijing's Hong Kong liaison office said in a statement, adding that no one should regard lightly the "steely constraints" of the law.
"The Central Government has carefully evaluated and is fully prepared for the situations that may be encountered during the implementation of Hong Kong's national security law," it said.
Footage released by state broadcaster CCTV showed images of the voting process just past 9am on Tuesday, where all 162 lawmakers in attendance voted in favour of the legislation. After it passed, there was a round of applause.
While the news broke on Hong Kong media mid-morning, Chinese media remained silent on the matter until the official announcement was released at 6pm, nearly nine hours later.
But the second most discussed topic on China's Twitter-like platform Weibo was "Joshua Wong announces he is quitting Hong Kong independence organisation", with 130 million people interacting with the hashtag.
The difference in media coverage is a clear indication of the "one country, two systems" principle by which Hong Kong has been governed since its handover to China - the territory enjoys freedoms like a free press and the freedom of assembly.
There are concerns that these will dissipate with the law's passage as Beijing tightens its grip over the city.
Early on Tuesday, a senior adviser to Beijing on Hong Kong policy told The Straits Times that the law had passed unanimously, with all 162 present members voting in favour of the legislation.
"I have been told that the law was passed unanimously, all 162 votes," Professor Lau Siu-kai said.
That all 162 members of the Standing Committee who attended the morning's session voted in favour of the law shows China's strong will to close the legal loophole in Hong Kong, he said.
Since it was first proposed at the start of China's annual parliamentary meetings late last month, the law has gone through a truncated legislative process, passing in just over 40 days.
The process has bypassed Hong Kong's Legislative Council, the local legislature.
The national security law will be a "new start" for Hong Kong, the nationalistic Global Times tabloid wrote in an editorial, but there will still be struggles.
"Chinese society, including Hong Kong society, must be prepared to support the enforcement of the law in the city after it is passed, to punish a few diehards who have been committed to jeopardising national security, and to fight some tough battles against US interference in Hong Kong, to truly establish a line of defence on national security there," it wrote.
A new national security agency, reporting directly to Beijing, will be set up under the ambit of the new law, while a national security committee chaired by the Hong Kong Chief Executive will be set up to implement the law.
But the legislation's passage has been met with strong resistance by Western governments and the pro-democracy camp in Hong Kong, who say it represents an end of the One Country, Two Systems principle that has governed the city since its return to China in 1997.
The United States has said it will end Hong Kong's special trading status, which means the territory will be subjected to the same tariffs as mainland China.
Hong Kong leader Carrie Lam said on Tuesday that this will have minimal impact on the city.
According to details of a draft released two weeks ago, the law will ban secession, subversion, terrorism and colluding with foreign forces to harm national security.
Beijing has been infuriated by pro-democracy protests that have rocked the city for nearly a year, insisting it is the work of foreign forces.
Hong Kongers and protest organisers say the protests, which have often resulted in violent street battles between demonstrators and police, is a manifestation of the simmering anger at the government.
Analysts have said the law is likely to come into effect on July 1, the anniversary of the former British colony's return to China, and traditionally a day of anti-government protests.