WASHINGTON (Reuters) - The U.S. Senate unanimously passed legislation on Tuesday aimed at protecting human rights in Hong Kong amid a crackdown on a pro-democracy protest movement, drawing condemnation from Beijing.

Following the voice vote, the “Hong Kong Human Rights and Democracy Act” will go to the House of Representatives, which approved its own version last month. The two chambers will have to work out their differences before any legislation can be sent to President Donald Trump for his consideration.

“The people of Hong Kong see what’s coming - they see the steady effort to erode the autonomy and their freedoms,” Republican Senator Marco Rubio said at the start of the brief Senate debate, accusing Beijing of being behind the “violence and repression” in the Asian financial hub.

The Senate passed a second bill, also unanimously, that would ban the export of certain crowd-control munitions to Hong Kong police forces. It bans the export of items such as tear gas, pepper spray, rubber bullets and stun guns.

Under the first Senate bill, U.S. Secretary of State Mike Pompeo would have to certify at least once a year that Hong Kong retains enough autonomy to qualify for special U.S. trading consideration that bolsters its status as a world financial center. It also would provide for sanctions against officials responsible for human rights violations in Hong Kong.

There was no immediate response from the White House, which has yet to say whether Trump would approve the Hong Kong Human Rights bill. A U.S. official said recently that no decision had been made, but the unanimous Senate vote could make a veto more difficult for the Republican president.

The official, who spoke on condition of anonymity, said if the measure got to Trump’s desk there would probably be an intense debate between Trump aides worried it could undermine trade talks with China and those who believe it is time to take a stand against China on human rights and Hong Kong’s status.

In Beijing on Wednesday, China condemned the passage of the Hong Kong Human Rights and Democracy Act, and vowed strong counter-measures to safeguard its sovereignty and security.

“This act neglects facts and truth, applies double standards and blatantly interferes in Hong Kong affairs and China’s other internal affairs,” foreign ministry spokesman Geng Shuang said in a statement.

Protesters are seen after leaving the campus of the Hong Kong Polytechnic University (PolyU), in Hong Kong, China November 19, 2019. REUTERS/Athit Perawongmetha

“It is in serious violation of international law and basic norms governing international relations. China condemns and firmly opposes it.”

The United States must immediately stop interfering in Hong Kong affairs and China’s other internal affairs, or “the negative consequences will boomerang on itself”, Geng added.

Pompeo said on Monday the United States was gravely concerned about Hong Kong’s deepening unrest and violence, urging the city’s government to tackle public concerns and China to honor the promises it made to maintain liberties after taking back the territory from British rule in 1997.

Pompeo addressed the issue again on Tuesday before leaving the United States for a NATO meeting in Brussels.

“We continue to urge everyone to do this peacefully,” he told reporters. “There is a political resolution of this that is achievable, we hope that’ll be the path forward.”

Demonstrators are angry at what they see as Chinese meddling in the freedoms promised to Hong Kong when Britain handed it back to China.

Senate aides said they expected the legislation eventually would move forward as an amendment to a massive defense bill, the National Defense Authorization Act, expected to pass Congress later this year.

Demonstrators in Hong Kong have been protesting in the streets amid increasing violence and fears that Beijing will ratchet up its response to stop the civil disobedience.

Following passage of the bill, Senate Democratic Leader Chuck Schumer said, “We have sent a message to President Xi (Jinping): Your suppression of freedom, whether in Hong Kong, in northwest China or in anywhere else, will not stand.

“You cannot be a great leader - and you cannot be a great country - when you oppose freedom, when you are so brutal to the people of Hong Kong, young and old, who are protesting.”

Xinjiang, in northwest China, is home to many mostly Muslim Uighurs, large numbers of whom have been detained in what China says are vocational training centers, but which some U.S. officials have called “concentration camps.”

This month the foreign ministry said China had lodged “stern representations” with the United States about the legislation and urged that it not be passed into law.

China would “inevitably take vigorous measures to firmly respond, to staunchly safeguard our sovereignty, security and development interests,” the ministry added.

Trump prompted questions about his commitment to protecting freedoms in Hong Kong when he referred in August to the mass street protests as “riots” that were a matter for China to deal with.

Trump has since urged China to handle the issue humanely, warning that anything bad that happened in Hong Kong could hurt talks to end a trade war between the world’s two largest economies.

In a post on Twitter on Wednesday, China’s embassy in the United States said, “The democracy and human rights held so dearly by the American people are once again abused by some American politicians to justify violence and disorder.”

It added, “Do they want to side with the rioters? SAD!”