China’s Foreign Minister Wang Yi said Japan had sent a “shocking” and dangerous signal on Taiwan, warning Tokyo had crossed a red line in comments that have fueled the sharpest rift between the two countries in years.

Wang, the most senior Chinese official to have commented publicly on the issue, said Japan was crossing a red line that must not be touched, according to the statement posted on the Chinese Ministry of Foreign Affairs' website.

He accused Japanese Prime Minister Sanae Takaichi of attempting to intervene militarily over Taiwan. Wang was referring to comments on Nov. 7 in which she told a questioner in parliament that a hypothetical Chinese attack on democratically governed Taiwan could trigger a military response from Tokyo.

The ensuing row, the biggest China-Japan crisis in years, has spread to trade and cultural relations. On Friday China raised the issue with U.N. Secretary-General Antonio Guterres, vowing to defend itself.

Beijing views democratically governed Taiwan as its own territory and has not ruled out the use of force to take control of the island. Taiwan's government rejects Beijing's claims and says only the island's people can decide their future.