Hong Kong, a former British colony that was granted special autonomy when China took control in 1997, has been rocked by six months of sometimes violent pro-democracy demonstrations.
Trump's approval of the bill was not unexpected. Neither was the reaction from Beijing, given China's adamant rejections of any commentary on what it considers an internal issue. But the clash comes at a sensitive time and could upset already thorny trade negotiations.
Chinese Vice Foreign Minister Le Yucheng told Ambassador Terry Branstad that the move constituted "serious interference in China's internal affairs and a serious violation of international law," a foreign ministry statement said.
Le called it a "nakedly hegemonic act." He urged the U.S. not to implement the bills to prevent greater damage to U.S.-China relations, the ministry said.
At a daily news briefing, ministry spokesman Geng Shuang responded to a question about how Trump's endorsement of the legislation might affect relations by saying it would undermine "cooperation in important areas."
The U.S. laws, which passed both houses of Congress almost unanimously, mandate sanctions on Chinese and Hong Kong officials who carry out human rights abuses in Hong Kong; require an annual review of Hong Kong's favorable trade status and prohibit the export to Hong Kong police of certain nonlethal munitions.
China has repeatedly accused the U.S. and other Western countries of orchestrating the mass demonstrations.
A ministry statement earlier Thursday repeated heated condemnations of the laws and said China would take unspecified "countermeasures." It said all people of Hong Kong and China oppose Washington's move.
It's unclear how China will respond exactly, and whether Trump's decision might disrupt negotiations with Beijing aimed at easing trade tensions.
Asked Thursday if the U.S. legislation would affect trade talks with Washington, a Chinese Commerce Ministry spokesman said he had no new information to share.
Trump earlier expressed concern about whether the legislation might complicate efforts to work out a trade deal with Chinese President Xi Jinping.
Recently both sides expressed confidence they were making headway on a preliminary agreement to avert a further escalation in a tariff war that has hammered manufacturers in both nations.
"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."
Echoing Beijing's complaints over foreign interference, C.Y. Leung, a former chief executive of Hong Kong, said Thursday that he doubted the U.S. or supporters of the bills in Hong Kong "ever had the interest of Hong Kong in mind."
He suggested Hong Kong was a "proxy" for China for the U.S. in hitting back against Beijing.
Leung, who struggled to quell weeks of pro-democracy demonstrations in 2014 during his own term in office, withheld comment on how well current Hong Kong leader Carrie Lam has handled the crisis.
But he suggested the protests would leave Hong Kong with fewer rather than more freedoms.
"The forces in Hong Kong, I will call them bad forces in Hong Kong, want to force Beijing's hands," Leung said in a talk at the Foreign Correspondents Club of Hong Kong. "These are not negotiators. They do not want a negotiated outcome. And often paint themselves into a corner. And they paint Hong Kong into a corner."