Photo/Illutration A protester holds an American flag at Hong Kong Polytechnic University in Hong Kong on early Nov. 20. (AP Photo)

WASHINGTON--The U.S. House of Representatives on Wednesday passed two bills to back protesters in Hong Kong and send a warning to China about human rights, with U.S. President Donald Trump expected to sign them into law, despite delicate trade talks with Beijing.

The House sent the bills to the White House after voting 417 to 1 for the "Hong Kong Human Rights and Democracy Act," which the Senate passed unanimously on Tuesday. Strong support had been expected after the House passed a similar bill last month.

The measure, which has angered Beijing, would require the State Department to certify at least once a year that Hong Kong retains enough autonomy to qualify for the special U.S. trading consideration that helped it become a world financial center.

It also would provide for sanctions against officials responsible for human rights violations in the Chinese-ruled city.

Demonstrators have protested for more than five months in the streets of Hong Kong, amid increasing violence and fears that Beijing will ratchet up its response to stop the civil disobedience.

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

Republican Senator Marco Rubio was a main sponsor of the Senate-passed bill, which was co-sponsored by Republican Senator Jim Risch and Democratic Senators Bob Menendez and Ben Cardin.

The House passed, by 417 to zero, a second bill, which the Senate also approved unanimously on Tuesday, to ban the export of certain crowd-control munitions to Hong Kong police forces. That measure bans the export of items such as tear gas, pepper spray, rubber bullets and stun guns.

Trump has 10 days, excluding Sundays, to sign a bill passed by Congress, unless he opts to use his veto.

A person familiar with the matter said the president intended to sign the bills into law, not veto them.

Vetoes would have been difficult to sustain, since the measures passed both the Republican-controlled Senate and Democratic-controlled House with almost no objections.

A two-thirds majority would be required in both the Senate and House to override a veto.

The Chinese embassy in Washington did not respond to a request for comment.

In Beijing on Wednesday, China condemned the legislation's passage, and vowed strong countermeasures to safeguard its sovereignty and security.

China's foreign ministry said this month that China had lodged "stern representations" with the United States about the legislation and urged that it not be passed into law, saying it would not only harm Chinese interests and China-U.S. relations, but the United States' own interests, too.

It said China would "inevitably take vigorous measures to firmly respond, to staunchly safeguard our sovereignty, security and development interests."

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

Trump has since called on China to handle the issue humanely, while warning that if anything bad happened in Hong Kong, it could be bad for talks to end a trade war between the world's two largest economies.

On Thursday, the ruling Chinese Communist Party’s main newspaper, the People’s Daily, urged the United States to "rein in the horse at the edge of the precipice" and stop interfering in Hong Kong matters and China’s internal affairs.

"If the U.S. side obstinately clings to its course, the Chinese side will inevitably adopt forceful measures to take resolute revenge, and all consequences will be borne by the United States," it said in a front-page editorial.