“They have a large responsibility for the chaos in Hong Kong, and deserve to be sanctioned and pay the price.”

China has responded to the new legislation with strong rhetoric, but the measures announced Monday suggested that Beijing was unwilling to let the dispute spill over into its trade negotiations with the United States.

It was unclear what impact, if any, the sanctions would have on the groups China has singled out for punishment. Most of the organizations Ms. Hua named do not have offices in mainland China. Foreign nongovernmental groups have already been subject to growing Chinese government pressure since 2016, when the country passed a wide-reaching law strictly regulating their operations in the country.

China has also previously denied permission to American naval vessels to dock in Hong Kong at times of heightened tensions between the two countries, most recently in August.

“It’s nothing new,” said Willy Lam, a political expert at the Chinese University of Hong Kong. “I think the major purpose of this is rhetorical: to try to convince the world that the U.S., whether it’s the C.I.A. or the N.G.O.s, is trying to foment a color revolution in Hong Kong.”