US lawmakers on Wednesday overwhelming approved legislation that supports human rights and democracy in Hong Kong and also backs the territory’s anti-China protesters, sending the measure opposed by Beijing to President Donald Trump.

The bill requires the US president to annually review the favourable trade status that Washington grants to Hong Kong, and threatens to revoke the coveted status that the semi-autonomous Chinese territory enjoys with the United States if its freedoms are quashed.

The measure now heads to Trump. He has not decisively said whether he will sign it, although the passage by a strong veto-proof majority may affect his calculus on the bill.

The House, by 417 votes to 0, also approved Senate-cleared legislation that would ban sales of tear gas, rubber bullets and other equipment used by Hong Kong security forces.

Michael McCaul, top Republican on the House Foreign Affairs Committee, denounced China’s “authoritarian brutality” on display in Hong Kong as he spoke directly to residents of the territory from the House floor.

Republican Senator Marco Rubio, a sponsor of the Senate bill, applauded Democratic House Speaker Nancy Pelosi for swiftly bringing it to a vote in her chamber.

“As the Chinese Communist Party and Hong Kong government officials continue to violate the basic rights of the Hong Kong people and erode Hong Kong’s autonomy, the United States must make clear that we continue to stand with Hong Kongers fighting for their long-cherished freedoms,” Rubio said.

The bill is seen as a challenge to the Chinese government amid tense US-China relations.

The bill also lays out a process for the US President to impose sanctions and travel restrictions on those who are found to be knowingly responsible for threatened or carried out arbitrary detention of any individual in Hong Kong, or other violations of internationally recognised human rights in the former British colony.

The democracy bill has received broad bipartisan support and will now go to the House of Representatives, which passed a slightly different version of the bill last month. Then, it will head to the White House for President Donald Trump to review.

Earlier on Wednesday, China condemned the passing of the Hong Kong Human Rights and Democracy Act of 2019 in the US Senate.

China’s top legislature said that0 Hong Kong courts have no power to rule on the constitutionality of legislation under the city’s Basic Law, which includes a proposed ban on face masks.

The ban on face-covering came into force in October, when the city’s unelected pro-Beijing leader invoked colonial-era legislation for the first time in more than 50 years.

In October, the city’s democracy activists went to court to challenge an emergency law that ban protesters from wearing masks, as protesters vowed to use Halloween parties to defy the restrictions once more.

The city’s embattled leader Carrie Lam had introduced a ban on people wearing masks at public rallies, colonial-era emergency legislation that has not been used in more than half a century.

The city has suffered nearly six months of increasingly savage anti-China protests and unrest that began over a now-shelved bill to allow extraditions to China, which revived fears that Beijing was slicing into the city’s freedoms.

(With inputs from agency)