At the closing session of the National People's Congress in Beijing, China's parliament approved a controversial decision on Thursday to go forward with national security legislation for Hong Kong.
Democracy activists in Hong Kong along with many Western countries fear the legislation could erode the city's freedoms and jeopardize its role as a global financial hub.
China claims the legislation will aim to tackle secession, subversion, terrorism and foreign interference in the city but the plan, unveiled in Beijing last week, triggered the first big protests in Hong Kong for months.
Riot police were out in force in Hong Kong as its lawmakers debated another piece of legislation, a bill to criminalize disrespect of China's national anthem, while the United States piled on pressure aimed at preserving the city's autonomy.
Dozens of protesters gathered in a shopping mall to chant slogans but there was no repeat of disturbances the previous day when police made 360 arrests as thousands took to the streets in anger over the anthem bill and the national security legislation proposed by China.
Last year, the city was rocked for months by often violent pro-democracy demonstrations over an unsuccessful bid to introduce a law governing extradition to China.
The Chinese government's security law for the city is fueling fear in Hong Kong and beyond that Beijing is imposing its authority and eroding the high degree of autonomy the former British colony has enjoyed under a "one country, two systems" formula since it returned to Chinese rule in 1997.
Members of China's mostly rubberstamp parliament, the National People's Congress, in the Great Hall of the People to the west of Beijing's Tiananmen Square, burst into prolonged applause when the tally showed 2,878 votes to one in favor of moving forward with legislation, with six abstentions.
Details of the law are expected to be drawn up in coming weeks. It is expected to be enacted before September.
Chinese authorities and the Beijing-backed government in Hong Kong say there is no threat to the city's autonomy and the new law would be tightly focused.
China's Premier Li Keqiang said the law would be good for Hong Kong's long-term stability and prosperity and the "one country, two systems" formula would remain a national policy.
Conflict between China and the United States would harm both sides while both stand to gain from cooperation, he told a news conference.
Hong Kong's Beijing-backed leader Carrie Lam said her government would work with Beijing to complete the legislative work as soon as possible.
"The law will not affect the rights and freedoms enjoyed by Hong Kong residents," she said in a statement welcoming the Chinese parliament's vote.
Democracy campaigners in the city were despondent, however.
"This is the death knell for Hong Kong, make no mistake of it, this is the end of 'one country, two systems' ... the Hong Kong that we loved, a free Hong Kong," pro-democracy lawmaker Dennis Kwok told reporters.
The United States, Britain and the European Union have also expressed concern about the security legislation and its implications for China's freest city.
US Secretary of State Mike Pompeo said on Wednesday Hong Kong no longer qualified for special treatment under US law, potentially dealing a crushing blow to its status as a major financial hub.
The proposed security law was "only the latest in a series of actions" undermining Hong Kong freedoms, he told Congress.
"No reasonable person can assert today that Hong Kong maintains a high degree of autonomy from China, given facts on the ground," he said.
The security law could see Chinese intelligence agencies set up bases in the city.
Relations between the two countries have been tense over China's claims in the South China Sea and trade, with the coronavirus pandemic adding to the acrimony.
"Already, international business is facing the pressure of increased tension between the US and China, but the enactment of China's security law for Hong Kong could take the tension to a whole new level," said Tara Joseph, president of the American Chamber of Commerce in Hong Kong.
"This is show time for Hong Kong," she said in a commentary in the South China Morning Post.
US President Donald Trump has promised action over Hong Kong, with an announcement at the end of the week. More than 1,300 US companies have offices in the city, providing about 100,000 jobs.
China said it would take necessary countermeasures against foreign interference in what it insists are its internal affairs.
Hong Kong stocks underperformed most of Asia, closing down 0.7%.
Trump's possible response could include visa and economic sanctions, David Stilwell, the State Department's assistant secretary for East Asia, told reporters.
By Jessie Pang and Yew Lun Tian/Reuters