WASHINGTON (AP) — President Donald Trump on Wednesday signed two bills aimed at supporting human rights and pro-democracy activists in Hong Kong.

Trump signed the bills, which were approved by near unanimous consent in the House and Senate, 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.”

Congress approved the bills last week following months of unrest in the semi-autonomous Chinese city. Before Wednesday’s signing announcement, Trump would only commit to giving the measures a “hard look.”

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.

The munitions bill was passed unanimously, while Republican Rep. Thomas Massie of Kentucky was the sole House member to oppose the human rights bill.

Trump acknowledged last week that he was weighing the ramifications of signing the bill.

“Look, we have to stand with Hong Kong,” Trump said in an interview on “Fox & Friends.” He continued: “But I’m also standing with President Xi. He’s a friend of mine. He’s an incredible guy.”

Democratic and Republican lawmakers applauded the signing of the bills. Sen. Robert Menendez, D-N.J., said it “finally sends a clear and unequivocal message to the people of Hong Kong: We are with you.”

Sen. Jim Risch, an Idaho Republican and chairman of the Senate Foreign Relations Committee, said the bills are “an important step forward in holding the Chinese Communist Party accountable for its erosion of Hong Kong’s autonomy and its repression of fundamental human rights.”