President Trump has signed a bill signaling support for Hong Kong's protests, prompting Beijing to issue a sharp response and summon the U.S. ambassador to China.

The Hong Kong Human Rights and Democracy Act of 2019 allows the United States to level sanctions on individuals who carry out human rights violations in Hong Kong, which has been rocked by mass protests for more than five months.

The legislation also requires the State Department's annual certification to Congress that Hong Kong is "upholding the rule of law and protecting rights" before continuing the city's special relationship with the U.S.

Hong Kong's special trade status with the U.S. has cemented the city's position as a global financial hub, allowing it unparalleled access to American and Chinese markets.

The act has wide support among Hong Kong's pro-democracy advocates, who argue the city is so crucial to China's economy that Beijing would not risk losing Hong Kong's trade status with the U.S. Graffiti and chants saying "pass the bill" proliferated across Hong Kong in recent weeks.

Critics argue the act will jeopardize Hong Kong's economic future without sufficiently punishing China if it suppresses the protests with excessive force.

"To me, Beijing would like nothing more than the US to remove Hong Kong's special status," Susan Thornton, the former acting assistant secretary of state for East Asian and Pacific affairs, said in an October interview with the Hong Kong newspaper the South China Morning Post. "They're wielding [the act] like a club, and they don't seem to understand that the club is basically going to whack the Hongkongers upside the head, and the Beijingers will be dancing in the streets."

A second bill signed into law by President Trump this week bans the U.S. sale of crowd management technology, such as rubber bullets and tear gas, to Hong Kong police.

President Trump expressed reservations over signing the bills, at a time when the administration has been locked in tense trade negotiations with Beijing.

"I signed these bills out of respect for President Xi [Jinping], China, and the people of Hong Kong. They are being enacted in the hope that Leaders and Representatives of China and Hong Kong will be able to amicably settle their differences leading to long term peace and prosperity for all," he said in a statement.

In a separate statement, Trump appeared to take issue with aspects of the legislation: "Certain provisions of the Act would interfere with the exercise of the President's constitutional authority to state the foreign policy of the United States," he said, without specifying further.

Last week, he said on Fox News "I stand with Hong Kong" but "we're also in the process of making the largest trade deal in history."

China's Foreign Ministry warned it will take countermeasures, without specifying what they will be.

"This is a severe interference in Hong Kong affairs, which are China's internal affairs. It is also in serious violation of international law and basic norms governing international relations," the Foreign Ministry said in a statement. "This Act will only further expose the malicious and hegemonic nature of US intentions to the Chinese people."

On Monday, China's Vice Foreign Minister Zheng Zeguang summoned U.S. Ambassador to China Terry Branstad, according to a Chinese notice posted on the ministry website, lambasting Branstad for U.S. meddling in "China's internal affairs."

China has repeatedly blamed foreign interference from the U.S. and U.K. for stoking the anti-government protests.

The protesters in Hong Kong say they are demonstrating to protect the limited autonomy and civil rights promised to them after the United Kingdom handed the city back to China in 1997. Millions took to the streets this summer in peaceful marches over a now-withdrawn extradition bill to send suspected criminals to mainland China for trial. Their demands now include democratic elections and investigations into alleged police brutality. According to Hong Kong demonstrators and international rights groups, Hong Kong police have used excessive force to crack down on the protests.

The U.S. legislation gained bipartisan support this year amid growing concerns that Beijing might suppress the current protests with military force or curtail civil liberties through restrictive national security measures.

The U.S. House and Senate passed the Hong Kong rights act with overwhelming, veto-proof majorities.

Florida Sen. Marco Rubio applauded the president's signing of the bill he sponsored.

"The U.S. now has new and meaningful tools to deter further influence and interference from Beijing into Hong Kong's internal affairs," Rubio told NPR's Franco Ordoñez. "Following last weekend's historic elections in Hong Kong that included record turnout, this new law could not be more timely in showing strong U.S. support for Hong Kongers' long-cherished freedoms."

NPR's Emily Feng reported from Beijing. Franco Ordoñez and Scott Horsely contributed reporting from Washington, D.C.

Copyright 2019 NPR. To see more, visit