US President Donald Trump has signed into law a bill that supports pro-democracy protesters in Hong Kong.
The Human Rights and Democracy Act will mandate an annual review, to ensure Hong Kong has significant autonomy from the rest of China.
Mr Trump said he signed the law “out of respect for President Xi [Jinping], China, and the people of Hong Kong”.
But the law will anger Beijing – Chinese officials have previously called for the US to “stop meddling”.
On Tuesday, China’s foreign ministry said it had summoned the US ambassador to Beijing to warn the US would “bear all the consequences” if the bill was signed into law.
Mr Trump is currently seeking a deal with China, in order to end a damaging trade war between the two countries.
Mr Trump had previously been noncommittal about whether he would sign the bill, saying he was “with” Hong Kong but that Mr Xi was also “an incredible guy”.
However, the bill had widespread congressional support, which meant that even if he vetoed the legislation, lawmakers could potentially have voted to overturn his decision.
The president also signed a second bill, which bans the export of crowd-control munitions to the police in Hong Kong – including tear gas, rubber bullets and stun guns.
“[The bills] 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,” Mr Trump said.
The bill was introduced in June in the early stages of the protests in Hong Kong, and was overwhelmingly approved by Congress last month.
It says: “Hong Kong is part of China but has a largely separate legal and economic system.
“The [annual review] shall assess whether China has eroded Hong Kong’s civil liberties and rule of law as protected by Hong Kong’s Basic Law.”
The US will monitor Hong Kong to make sure it is autonomous enough to justify its special trading status.
Among other things, Hong Kong’s special trading status means it is not affected by US sanctions or tariffs placed on the mainland.
The bill also says the US should allow Hong Kong residents to obtain US visas, even if they have been arrested for being part of non-violent protests.
Hong Kong’s protests started in June against a proposed law to allow extradition to mainland China but it has since transformed into a larger pro-democracy movement.
The protests have also seen increasingly violent clashes, with police being attacked, and officers firing live bullets.
Protesters have thrown petrol bombs and attacked businesses seen as being pro-Beijing.
The protesters, meanwhile, have accused police of brutality.
On Sunday, Hong Kong held local council elections that were seen as a barometer of public opinion towards the government and the protesters.
The elections saw a landslide victory for the pro-democracy movement, with 17 of the 18 councils now controlled by pro-democracy councillors.