President Donald Trump has 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.

The president signed these bills out of respect for President Xi, China, and the people of Hong Kong, Trump said in a statement.

But China has reacted furiously to the president's signing of the bills and said the US will bear the unspecified consequences, but it is unclear how China will respond exactly.

The president signed these bills out of respect for President Xi, China, and the people of Hong Kong, Trump said in a statement. Credit: AP

The laws 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.

In reaction, China summoned the U.S. ambassador to "strongly protest" President Donald Trump's signing.

Protesters stick posters featuring Chinese President Xi Jinping on a pillar in Hong Kong. Credit: AP

China's foreign ministry called the laws a naked hegemonic action that seriously interfered in Hong Kong and China internal affairs, violated international law and fundamental norms of international relations.

"The U.S. side ignored facts, turned black to white, and blatantly gave encouragement to violent criminals who smashed and burned, harmed innocent city residents, trampled on the rule of law and endangered social order," the statement said.

"The laws basic intent is to undermine Hong Kong's prosperity and stability along with the historical progress of the great rejuvenation of the Chinese nation."

It called the measures extremely evil in nature and dangerous in motive.

The first bill Trump signed mandates sanctions on Chinese and Hong Kong officials who carry out human rights abuses and requires an annual review of the favourable trade status that Washington grants Hong Kong.

China said the U.S. will bear the unspecified consequences for signing the bills. Credit: AP

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.

Police began clearing a Hong Kong university that was a flashpoint for clashes with anti-government demonstrators on Thursday.

The move into the Polytechnic University came after its administration said they believed no one else remained inside after a two-day search ended Wednesday.

Faculty teams found only a young woman in weak condition and a stockpile of dangerous items including petrol bombs and corrosive liquid.

The Polytechnic University has been ringed by police for 11 days as protesters retreated into the campus after blocking a major tunnel and set toll booths on fire during clashes with police.

President 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."

A foreign ministry statement said China will counteract. Credit: AP

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.'

Rep. Chris Smith, R-N.J., who sponsored the House human rights bill, said: "Xi should understand that the U.S. is not kidding about human rights.

"Beating, torturing and jailing of democracy activists is wrong and this historic legislation lets China know that respecting fundamental human rights is paramount."

Activists hailed Trump's action. "I know that many people in Hong Kong are happy that the U.S. government has passed a new bill," said Figo Chan, a 23-year-old Hong Kong protester who was honoured with the John McCain Prize for Leadership at the Halifax International Security Forum in Canada last weekend.

"No one wants to die and no one wants to be hurt," Chan said. "I hope that citizens of many different countries can in their own way fight for democracy."