BEIJING (Reuters) - China on Monday banned U.S. military ships and aircraft from visiting Hong Kong and slapped sanctions on several U.S. non-government organizations for allegedly encouraging anti-government protesters in the city to commit violent acts.

Slideshow ( 2 images )

The measures were a response to U.S. legislation passed last week supporting the protests which have rocked the Asian financial hub for six months. It said it had suspended taking requests for U.S. military visits indefinitely, and warned of further action to come.

“We urge the U.S. to correct the mistakes and stop interfering in our internal affairs. China will take further steps if necessary to uphold Hong Kong’s stability and prosperity and China’s sovereignty,” Chinese Foreign Ministry spokeswoman Hua Chunying said at a news briefing in Beijing.

China last week promised it would issue “firm counter measures” after U.S. President Donald Trump signed into law the Hong Kong Human Rights and Democracy Act, which supports anti-government protesters in Hong Kong and threatens China with sanctions for human rights abuses.

There are fears that the dispute over Hong Kong could impact efforts by Beijing and Washington to reach a preliminary deal to de-escalate a prolonged trade war between the world’s two largest economies.

In more normal times, several U.S. naval ships visit Hong Kong annually, a rest-and-recreation tradition that dates back to the pre-1997 colonial era and one that Beijing allowed to continue after the handover from British to Chinese rule.

“We have a long track record of successful port visits to Hong Kong, and we expect that to continue,” said a U.S. State Department official, who spoke on condition of anonymity.

“False accusations of foreign interference” against the U.S. NGOs “are intended to distract from the legitimate concerns of Hongkongers,” the official said.

Pentagon spokesman Lieutenant Colonel Dave Eastburn said port visits to Hong Kong and elsewhere around the world served as a useful program to “provide liberty for our sailors and expand people-to-people ties with our hosts”.

“With regard to the ongoing protests, we condemn the unjustified use of force and urge all sides to refrain from violence and engage in constructive dialogue,” he said in a statement.

A U.S. defense official, speaking on condition of anonymity, said China’s move would not have an impact on U.S. military operations.

Visits have at times been refused amid broader tensions and two U.S. ships were denied access in August.

The USS Blue Ridge, the command ship of the Japan-based Seventh Fleet, stopped in Hong Kong in April – the last ship to visit before mass protests broke out in June.

Foreign NGOs are already heavily restricted in China, and have previously received sharp rebukes for reporting on rights issues in the country, including the mass detention of Uighur Muslims in Xinjiang.

The U.S.-headquartered NGOs targeted by Beijing include the National Endowment for Democracy, the National Democratic Institute for International Affairs, the International Republican Institute, Human Rights Watch, and Freedom House.

“They shoulder some responsibility for the chaos in Hong Kong and they should be sanctioned and pay the price,” Hua said.