The US military says a Chinese fighter jet flew dangerously close to an Air Force plane over the South China Sea, forcing the American pilot to manoeuvre to avoid a collision.

US Indo-Pacific Command said in a statement that the incident occurred on December 21 when the Chinese People’s Liberation Army Navy J-11 flew in front of and within six metres (20 feet) of the nose of an RC-135, a type of large reconnaissance plane operated by the US Air Force.

The US plane was “lawfully conducting routine operations over the South China Sea in international airspace,” the statement said. Its pilot was forced to “take evasive manoeuvres to avoid a collision”.

China frequently challenges military aircraft from the US and its allies, especially over the strategically vital South China Sea, which China claims in its entirety. Such behaviour led to a 2001 in-air collision in which a Chinese plane was lost and pilot killed.

“The US Indo-Pacific Joint Force is dedicated to a free and open Indo-Pacific region and will continue to fly, sail and operate at sea and in international airspace with due regard for the safety of all vessels and aircraft under international law,” the statement said.

“We expect all countries in the Indo-Pacific region to use international airspace safely and in accordance with international law,” it said.

China resents the presence of US military assets in the South China Sea and regularly demands its ships and planes leave the area. The US says it is fully entitled to operate in and over the South China Sea and ignores the Chinese demands.

Such dangerous incidents persist despite US-China agreements on how to deal with unexpected encounters.

The US and others have also accused China of harassing military aircraft and ships in the East China Sea off the Chinese coast and as far away as the Horn of Africa, where China operates a naval base.

There was no immediate response to the latest US complaint from the PLA, the military wing of China’s ruling Communist Party.

Chinese Foreign Ministry spokesperson Wang Wenbin offered no details, but accused the US of posing “serious threats to China’s national security”, with its surveillance operations.

“China will continue to take necessary measures to firmly defend its sovereignty and security and work with regional countries to firmly defend the peace and stability of the South China Sea,” Mr Wang said at a daily briefing on Friday.

Mr Wang also renewed Beijing’s objections to US arms sales to Taiwan, the self-governing island democracy that Beijing threatens to bring under its control by force if necessary. Washington this week approved the sale of a 180 million dollar (£149 million) anti-tank system to Taiwan as the threat from China’s military rises.

Though the US has no formal ties with Taiwan in deference to Beijing, it is required by US law to ensure the island has the means to defend itself.

While Beijing has given Taiwan no deadline to accept its ultimatum, some US defence officials believe Chinese leader Xi Jinping has become more eager to force a military solution in the coming years.

The US “should stop arms sales and military contact with Taiwan and stop creating new factors that could lead to tensions in the Taiwan Strait,” Mr Wang said.

“China will take strong measures to firmly defend its sovereignty and security interests,” he said.