HONG KONG — The crisis over Hong Kong’s future took center stage in worsening U.S.-China relations Thursday, as protesters called on President Trump to sign into law a bill intended to protect human rights in the territory over Beijing’s increasingly strident objections.

The prospect of a diplomatic showdown between the United States and China over Hong Kong pushed Asian stock markets lower, after Congress passed a bill that paves the way for sanctions against officials involved in the crackdown on pro-democracy protests.

Chinese Foreign Minister Wang Yi said the U.S. actions severely damage bilateral relations and do not help world peace and stability, and state news media urged the United States to “rein in the horse at the edge of the precipice” and stop interfering in 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,” the People’s Daily, the Communist Party’s official newspaper, said in a front-page editorial.

But on the streets of Hong Kong, Washington’s support was welcomed — even if it was not seen as a game changer. Protesters are regrouping after a tough week in which more than 1,000 were apprehended and hundreds injured in a failed attempt to turn the city’s universities into fortified bases.

“Sign the bill, protect Hong Kong!” a group of more than 100 protesters chanted at an upscale shopping mall. “Five demands, not one less!” they shouted, referring to their list of grievances against authorities in Hong Kong and Beijing.

In Washington, the Hong Kong bill brought rare bipartisan cooperation even as the impeachment inquiry deeply divided lawmakers.

House Speaker Nancy Pelosi (D-Calif.) celebrated the bill’s passage as “a day of mutual respect for democratic freedoms, the courage of the young people there to speak out, and also [a] day of great bipartisanship in the House of Representative and the United States Senate.”

“It hardly gets any better than that,” she added.

After the ceremony, Rep. Michael McCaul (Tex.), the ranking Republican on the House Foreign Affairs Committee, told reporters that he thought Trump would sign the bill. Not to do so “would fly in the face of the truth that this is happening in Hong Kong and we need to support the people of Hong Kong,” he said.

The White House declined to comment on the bill, but it has near-unanimous backing as Congress appears determined to send a message to the Chinese government.

“I think what you’ve seen here is a willingness to stand up on the side of the protesters,” Sen. John Cornyn (R-Tex.) said shortly after the legislation was passed in the Senate. “The communist government of China needs to know that if they take further aggressive action against the protesters, and perhaps escalating threats and the loss of life, from the injury to the protester . . . it will escalate the battle here in the Congress.”

Hong Kong’s stock market slid 1.6 percent, with shares across Asia also falling, as investors worried that the intensifying dispute could delay or derail an interim U.S.-China trade deal.

Months of protests in Hong Kong and an intensifying police crackdown have heightened concerns about Beijing’s encroachment on the Asian financial hub’s relative freedoms and autonomy.

In a dramatic escalation this past week, hundreds of protesters barricaded themselves on a college campus and battled riot police with makeshift weapons. A few dozen were still holding out inside the Polytechnic University on Thursday. Others disrupted public transportation, although in the past two days, relative calm has returned to the city.

The Hong Kong Human Rights and Democracy Act, which Trump has 10 days to sign, would require the secretary of state to certify annually whether Hong Kong is sufficiently autonomous from China to justify its special trading status.

Failure to issue that certification would effectively deal a massive blow to Hong Kong’s role as a global financial and trading hub. The American Chamber of Commerce in Hong Kong has warned of possible “unintended, counterproductive” consequences that could undermine the territory’s unique position.

China’s Commerce Ministry said it will strive to reach an initial trade agreement with the United States, in an attempt to allay fears that talks might be unraveling.

In Hong Kong, some protesters and sympathizers reacted positively to the prospect of U.S. diplomatic pressure to support their cause.

“This bill is not a painkiller,” wrote Raymond, a 29-year-old protester who declined to give his full name for fear of retribution, in an online forum.

He argued that it was “totally stupid” to think the United States would be able to safeguard Hong Kong, although the U.S. measures were still a setback for the Chinese and Hong Kong governments.

“But honestly that is good news for Hong Kong people because [there has been] too much bad news over these two weeks,” Raymond wrote. “We are all depressed and upset.”

Antony Dapiran, a lawyer and author of books on Hong Kong’s protest movement, said the bill was seen as providing “significant moral support” but was, nevertheless, largely symbolic. There is also a risk that Hong Kong becomes a bargaining chip in Trump’s broader confrontation with China, he said.

“Clearly, Hong Kong is something of a pawn in the middle of a much bigger game here,” he said.

A public-opinion poll released last week found that more than half of Hong Kongers surveyed strongly supported the U.S. bill and fewer than a quarter strongly opposed it.

At the Polytechnic University, protesters have stockpiled molotov cocktails, rocks and other weapons, but acting student union president Ken Woo Kwok-wang said most of the remaining protesters simply want to leave.

“It is meaningless to stay with just a few people,” he said, speaking from inside the campus. “However, the accusation of rioting really threatens us, which is the main reason why we don’t want to go outside.” A charge of rioting can lead to a prison sentence of up to 10 years.

Woo said the protesters needed supplies and medical help, while some of those sleeping outside had been evacuated after suffering from hypothermia.

Images from the campus showed a wasteland of smashed glass, twisted metal from improvised barricades, bricks, debris and abandoned gasoline bombs.

Protesters said they were undaunted by the mass arrests and were concentrating on mobilizing a big turnout for district council elections to be held Sunday.

Overnight, Hong Kong police tried to persuade the remaining protesters at the college campus to surrender.

“It’s common sense that you have to face the penalty if you break the law, just like you have to pay the bill after having a meal in a restaurant,” a police officer said over a loudspeaker.

“No worries, if you are stubborn, we can stay here and wait for you till Christmas Day, New Year, Easter. However, when more and more protesters surrender and leave, less and less of you were inside. Please do not resist if we break into the campus. All right?”

Then the police played a song called “Surrounded” by the Taiwanese singer Jay Chou.

Shibani Mahtani in New York, Anna Kam in Hong Kong and Kayla Epstein in Washington contributed to this report.