BEIJING — China said Monday that it would sanction U.S.-based nonprofit organizations, including the National Endowment for Democracy and Human Rights Watch, in retaliation for new U.S. legislation that supports Hong Kong’s protesters.

Foreign Ministry spokeswoman Hua Chunying did not give details about the sanctions or articulate how the nonprofit groups’ operations will be affected in the semiautonomous city, where many maintain regional offices to conduct China-related work.

China also will suspend rest-and-recuperation visits to Hong Kong by U.S. military ships and aircraft, Hua said, adding that further moves are possible.

The comments were a stark warning to organizations that China sees as aligned with Washington — and the first salvo in what Beijing has promised will be “forceful” retaliation against the United States for the Hong Kong Human Rights and Democracy Act, which was passed by Congress and signed into law by President Trump last week.

The move could further elevate Hong Kong as a flash point between Beijing and Washington. The Chinese government has viewed the five-month protests in Hong Kong as an American attempt to foment a “color revolution” rather than an outpouring of genuine anger over police conduct and declining political freedoms in the territory.

The NED, Human Rights Watch, Freedom House, the National Democratic Institute for International Affairs and the International Republican Institute are among the institutions that will be sanctioned for their “odious behavior” in Hong Kong, where they have “strongly instigated extremely violent criminal activities,” Hua told reporters in Beijing.

“They bear great responsibility for the current chaos in Hong Kong,” she said. “These organizations deserve to be sanctioned, and they must pay the price for it.”

China, echoing such governments as Venezuela and Egypt, has previously taken aim at the NED, established in 1983 and funded by Congress to promote democracy worldwide. The Foreign Ministry in August distributed a lengthy report that named the NED as a U.S. intelligence front and listed its 20-year history of funding political groups in Hong Kong.

It is not immediately clear how the sanctions would affect foundations or corporations that donate to the blacklisted nonprofit organizations. Few of the groups have staff on mainland China.

Human Rights Watch Executive Director Kenneth Roth said his organization does not receive funding from any government and “regrets” China’s announcement of unspecified sanctions.

Human Rights Watch has called on all sides in the protests to refrain from violence, he said. “Rather than target an organization that seeks to defend the rights of the people of Hong Kong, the Chinese government should respect those rights,” Roth said.

Freedom House said the threat of sanctions strengthened its resolve to oppose the Chinese government’s efforts to undermine human rights. “We do not look to the Chinese Communist Party for permission to support such legitimate goals,” Michael J. Abramowitz, president of Freedom House, said in a statement.

Foreign nonprofit workers inside China have long faced suspicion and a degree of vulnerability. Michael Kovrig, a former Canadian diplomat working for the nongovernmental International Crisis Group, has been detained for the past year on national security grounds. He was seized in the midst of a diplomatic dispute between Beijing and Ottawa.

Peter Dahlin, a Swede, was detained in 2016 for his involvement in providing legal aid to a network of Chinese activists that the Communist Party considered subversive.

China has elevated scrutiny of foreign nonprofit organizations since the passage of an NGO law in 2016 that gave security officials broad supervision powers.

Last week, Chinese officials disclosed for the first time a police investigation conducted under the NGO law. The New York-based nonprofit Asia Catalyst, which worked on HIV-related public health projects in southern China, was investigated by Beijing police and fined, the Foreign Ministry announced.