TOKYO (Reuters) - Beijing could gain and Washington lose if feuding persists between U.S. allies Japan and South Korea, a foreign policy adviser to Japan’s premier said on Thursday after the latest row involving a Japanese patrol plane and South Korean warship.

FILE PHOTO - Special advisor to the Japanese Prime Minister Katsuyuki Kawai speaks during a kick-off ceremony by the Mission from the Government of Japan for the study on possible support toward anti-drug measures, at Japanese embassy in Pasay city, Metro Manila, Philippines December 12, 2016. REUTERS/Czar Dancel

Relations between Seoul and Tokyo have chilled due to intensifying rows over their wartime history, including Japan’s 1910-45 colonization of the Korean peninsula, threatening regional efforts to rein in North Korea’s nuclear program.

Adding to the tensions are tit-for-tat allegations of risky moves by each country’s military.

In the latest episode, South Korea’s military said on Wednesday that a Japanese military plane had made a low altitude flight over a South Korean navy vessel in waters off the Korean peninsula.

Japan said Seoul’s allegation was inaccurate.

“The country whose national interests in the region will be most damaged if our two countries’ ... bilateral ties are damaged is the United States of America,” Katsuyuki Kawai, a special foreign policy adviser to Prime Minister Shinzo Abe, told Reuters.

China stands to gain influence over the Korean peninsula if Seoul leaves the “liberal democratic camp” exemplified by U.S.-Japan-South Korea cooperation, Kawai said, a scenario he said was now being dubbed “Korexit”.

“Korexit is a nightmare,” Kawai said.

Wednesday’s episode follows a December row over a Japanese complaint that a South Korean destroyer locked its targeting radar on a Japanese surveillance plane. Seoul rejected the accusation.

Relations have also deteriorated since South Korea’s top court ruled last year in favor of South Koreans seeking compensation from Japanese firms for wartime forced labor.

The Japanese government says all wartime reparations were dealt with in a 1965 treaty that had normalized ties between the two neighbors.

Kawai said he saw no easy solution to the tensions with Seoul, which he predicted were likely to worsen ahead of the 100th anniversary of the March First Independence Movement against Japanese colonial rule.

“It’s a deadlock,” he said.

U.S President Donald Trump’s predecessor Barack Obama sought to improve ties between Seoul and Tokyo in 2014 by engineering a trilateral summit between Abe and then-South Korean president Park Geun-hye.

But Kawai said changed circumstances, including Trump’s focus on a planned second summit with North Korean leader Kim Jong Un and the conservative Park’s replacement by left-leaning Moon Jae-in, made a similar intervention difficult.