President Trump on Wednesday signed two bills aimed at supporting human rights and pro-democracy activists in Hong Kong.

The legislation, approved by near unanimous consent in the House and Senate, would impose sanctions on China and Hong Kong officials for human rights violations that are perpetrated in the semi-autonomous territory. Trump signed the bills even as he expressed some concerns about complicating the effort to work out a trade deal with China’s President Xi Jinping.

“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.”

Trump up until Wednesday had been reluctant to sign the measures amid the ongoing trade war with.

China had threatened to take unspecified, “strong countermeasures” if the bills were signed into law.

The Hong Kong Human Rights and Democracy Act mandates sanctions on Chinese and Hong Kong officials who carry out human rights abuses and requires an annual review of the favorable trade status that Washington grants Hong Kong.

Another bill prohibits export to Hong Kong police of certain nonlethal munitions, including tear gas, pepper spray, rubber bullets, water cannons, stun guns and tasers.

Hong Kong has been mired by months of anti-government protests that began when the country introduced a since-scraped extradition bill.

The demonstrations over time evolved into broader pro-democracy protests with more demands, including universal suffrage and amnesty for arrested protesters.

With Post wires