On Saturday, the US Indo-Pacific Command said the Chinese military ship PRC LY 132 came within 150 yards of the USS Chung-Hoon destroyer during a joint Canada-US exercise in the Taiwan Strait, when the ships crossed the strait.
"The actions taken by the Chinese military were necessary measures to respond to the provocations of the corresponding countries, they are justified, legal, safe and professional," Wang told a briefing.
The diplomat also said that China had always respected the freedom of navigation and flight in accordance with international law, but stressed that Beijing opposed possible incidents in the Taiwan Strait.
The situation around Taiwan escalated again after Taiwanese President Tsai Ing-wen met with US House Speaker Kevin McCarthy in April, with Beijing launching massive three-day military drills near the island in what it called a "warning" to Taiwanese separatists and foreign powers.
Taiwan has been governed independently of mainland China since 1949. Beijing considers the island a province of China, while Taiwan says it is an autonomous country but stops short of declaring independence. Beijing opposes any official foreign contacts with Taipei and regards Chinese sovereignty over the island as indisputable.