China's President Xi Jinping and US President Donald Trump during a meeting outside the Great Hall of the People in Beijing.

China's Ministry of Foreign Affairs said Thursday the U.S. has "sinister intentions" and its "plot" is "doomed to fail," after President Donald Trump signed two bills supporting Hong Kong protesters into law.

State media also published a statement from the Hong Kong liaison office, emphasizing its commitment to defending its "one country, two systems" policy.

"We are officially telling the U.S. and the handful of opposition politicians in Hong Kong who follow America's lead to not underestimate our determination to protect Hong Kong's prosperity and stability, don't underestimate our belief to protect the 'one country, two systems policy' and don't underestimate our capabilities and strategies in protecting our country's sovereignty, safety, growth and rights," the office said, according to a CNBC translation of an online-Chinese language statement.

Hong Kong is a semi-autonomous territory which operates under the "one country, two systems" principle — a structure that grants the city's citizens some degree of financial and legal independence from the mainland.

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

Beijing's statements came just hours after Trump signed the Hong Kong Human Rights and Democracy Act of 2019 into law. That bill would require the State Department to certify once a year that Hong Kong is sufficiently autonomous to retain its special U.S. trading consideration — a status that helps its economy. He also signed another bill banning the sale of munitions like tear gas and rubber bullets to Hong Kong police.

"This so-called bill will only make the Chinese people, including our compatriots in Hong Kong, further understand the sinister intentions and hegemonic nature of the United States. It will only make the Chinese people more united and make the American plot doomed to fail," China's foreign ministry said in an online Chinese-language statement Thursday, according to a CNBC translation.