BEIJING (Reuters) - China said US military ships and planes would not be allowed to visit Hong Kong, and announced sanctions against a number of US non-governmental organizations over last week's congressional passage of legislation supporting anti-government protesters in Hong Kong.

The measures were announced by the Chinese Foreign Ministry, which also confirmed that it had suspended the requests for visit from the US military indefinitely, warning of further action.

US ships dock regularly in Hong Kong as part of visits that allow them to meet their needs in the former British colony.

"We urge the United States to fix mistakes and stop interfering in our internal affairs. Beijing will take further steps when necessary to maintain the stability and prosperity of Hong Kong and China's sovereignty," Chinese Foreign Ministry spokeswoman Hua Chunying said at a briefing in Beijing.

She added that non-governmental organizations punished by China "bear some responsibility for the chaos in Hong Kong and should be punished and paid the price."

Organizations targeted by Chinese sanctions, based in the United States, include the National Endowment for Democracy, the National Democratic Institute for International Affairs, the International Republican Institute, Human Rights Watch and Freedom House.

Beijing last week vowed to take "firm countermeasures" after US President Donald Trump signed the Hong Kong Human Rights and Democracy Act, which supports anti-government protesters in the city and threatens China with possible sanctions.