China has summoned the Japanese ambassador in Beijing over Prime Minister Sanae Takaichi's comments on Taiwan.

China and Japan have been locked in an escalating war of words this week, set off by Takaichi's suggestion that Japan could respond with its own self-defense force if China attacked Taiwan.

Both countries' foreign ministries have lodged serious protests with each other. A Chinese diplomat also made a comment which some interpreted as a threat to behead Takaichi.

The spat touches on the historical animosity between China and Japan, as well as longstanding strategic ambiguity on the sovereignty of self-governed Taiwan.

Recent tensions were sparked at a parliamentary meeting in Japan last Friday when Takaichi was asked what situations concerning Taiwan would threaten Japan's survival. She responded that battleships and the use of force could constitute such a scenario.

Following Takaichi's remarks, China's foreign ministry called them egregious, and Chinese consul general Xue Jian posted a threatening message on social media, which Japan condemned.

Both countries are attempting to assert their positions while dealing with historical grievances that have persisted for generations, particularly relating to military conflicts in the 1800s and World War Two.

The confrontation has raised concerns among international observers, especially the United States, regarding the increasingly aggressive postures surrounding Taiwan, a region of intense strategic interest and potential conflict.