Why exuberant Hong Kong protesters are waving American flags

President Trump signed the Hong Kong Human Rights and Democracy Act Wednesday.

Hong Kong pro-democracy protesters waving American flags filled the streets Thursday to celebrate President Donald Trump's signing of a law that supports their months-long movement.

Images and video footage from the semi-autonomous city showed thousands of protesters out to praise the action, with many waving or adorning red, white and blue flags.

President Trump on Wednesday signed the Hong Kong Human Rights and Democracy Act, which will seek to ensure that Hong Kong has sufficient autonomy from China to maintain favorable trading terms with the United States.

The bill, which would impose sanctions on Chinese officials for cracking down on the protesters, passed the House and Senate last week with nearly unanimous support.

Sen. Josh Hawley, R-Mo., who co-sponsored the bill, said in a statement to ABC News that the signing "sends a clear signal to Beijing: the United States will not stand by and watch China break its treaty commitments and try to dominate all of Asia."

China lambasted the signing of the bill, citing further damage to the U.S.-China relations.

Chinese Vice Foreign Minister Le Yucheng told U.S. Ambassador Terry Branstad that the move constituted "serious interference in China's internal affairs and a serious violation of international law."

Protests in Hong Kong began in early June in response to a proposed law that would allow extradition to mainland China and in favor of more direct democracy. The law has since been withdrawn, but the protests have continued over police violence and expanded demands.

ABC News' Joseph Simonetti contributed to this report.