President Trump Donald John TrumpFederal prosecutor speaks out, says Barr 'has brought shame' on Justice Dept. Former Pence aide: White House staffers discussed Trump refusing to leave office Progressive group buys domain name of Trump's No. 1 Supreme Court pick MORE on Wednesday signed legislation offering support for pro-democracy protesters in Hong Kong, one week after it passed the House and Senate with veto-proof majorities.

The White House made the announcement that Trump had signed the Hong Kong Human Rights and Democracy Act despite protests from officials in Beijing, who complain that the legislation meddles in their domestic matters.

"I signed these bills out of respect for President Xi, China, and the people of Hong Kong," Trump said in a statement. "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."

ADVERTISEMENT

The legislation imposes sanctions on individuals who commit human rights violations in Hong Kong and blocks them from entering the United States.

It would also require the State Department to provide an annual report to lawmakers on whether Hong Kong remains "sufficiently autonomous" from China.

Beijing had called the bill "unnecessary and unwarranted," and officials there threatened retaliatory measures if it became law.

Wednesday's announcement capped days of uncertainty over whether Trump would sign the legislation into law. While administration officials and experts said it was unlikely he would veto the measure given that move would be overturned by Congress, the president had in recent days refused to commit to signing it.

Trump has described the Hong Kong protests as linked to the trade deal his administration has been negotiating with Beijing and voiced a desire to balance those two interests.

"I stand with Hong Kong. I stand with freedom. I stand with all of the things that we want to do," Trump told "Fox & Friends" last week.

ADVERTISEMENT

"But we also are in the process of making the largest trade deal in history," he continued. "And if we could do that, that would be great. China wants it. We want it. And I will say this. If it weren't for me, thousands of people would have been killed in Hong Kong right now."

The U.S. and China are still working to finalize a "phase one" trade agreement that was first announced more than a month ago. The president has repeatedly claimed that ongoing trade talks have kept violence in Hong Kong at bay.

Pro-democracy protesters in Hong Kong have clashed with law enforcement for months. The protests were sparked by a bill that would have allowed some citizens to be extradited to China and have persisted in the weeks since the legislation was withdrawn.

The demonstrations have been marred by violent clashes with law enforcement. Tensions spiked again this month when officials reportedly threatened the use of lethal ammunition on demonstrators if they did not vacate Hong Kong Polytechnic University’s campus.

Lawmakers in both parties warned Trump against putting the trade deal ahead of support for the protesters.

"Today marks a great victory for the people of #HongKong and the fight for autonomy and human rights!" Sen. Rick Scott (R-Fla.) tweeted.

Sen. Marco Rubio Marco Antonio RubioGOP lawmakers distance themselves from Trump comments on transfer of power McConnell pushes back on Trump: 'There will be an orderly transition' Graham vows GOP will accept election results after Trump comments MORE (R-Fla.) said in a statement that the decision "could not be more timely in showing strong U.S. support for Hong Kongers’ long-cherished freedoms."

Pro-democracy candidates in Hong Kong won sweeping victories earlier this week in local elections amid a groundswell of voter turnout.