TOKYO (AP) — Japanese Prime Minister Shinzo Abe said South Korea’s decision to cancel a deal to share military intelligence, mainly on North Korea, is damaging mutual trust and vowed Friday to work closely with the U.S. for regional peace.

Abe also accused South Korea of not keeping past promises. The intelligence agreement started in 2016.

“We will continue to closely coordinate with the U.S. to ensure regional peace and prosperity, as well as Japan’s security,” he said ahead of his departure for the Group of Seven summit of industrialized nations in France.

South Korea announced Thursday it would terminate the intelligence deal because Tokyo’s decision to downgrade South Korea’s preferential trade status had caused a “grave” change in the security cooperation between the countries. Seoul says it will downgrade Tokyo’s trade status as well, a change that would take effect in September.

Senior South Korean presidential official Kim Hyun-chong on Friday defended his government’s decision. He told reporters that “there is no longer any justification” for South Korea to continue the deal because of Japan’s claim that basic trust between the countries had been undermined.

South Korea has accused Japan of weaponizing trade to punish it over a separate dispute linked to Japan’s brutal colonial rule of the Korean Peninsula from 1910 to 1945. Japan denies any retaliation.

Kim accused Japan of having ignored South Korea’s repeated calls for dialogue and other conciliatory steps to resolve the bitter trade and history disputes. He said Japan’s “breach of diplomatic etiquette” had undermined “our national pride.”

Japan has long claimed all wartime compensation issues were settled when the two countries normalized relations under a 1965 treaty.

But South Korea’s Supreme Court last year ruled that the deal did not cover individual rights to seek reparations and has ordered compensation for victims of forced labor under Japan’s colonial rule.

South Korea’s decision on the military intelligence pact came as a surprise to many and underlined how much relations with Japan have deteriorated.

The U.S. sees both South Korea and Japan as important allies in northern Asia amid continuing threats from North Korea and China. The Pentagon expressed “strong concern and disappointment” over the collapse of the agreement.

Kim said South Korea will push to bolster its alliance with the United States. He said South Korea will also try to actively use a trilateral intelligence-sharing channel with the United States and Japan. Before the 2016 bilateral deal was forged, Seoul and Tokyo used that three-way channel to exchange intelligence via the United States.

China, North Korea’s last major ally, which earlier criticized the intelligence deal, said Friday that it respects South Korea’s “independent right of a sovereign state” to take the step.

“The bilateral arrangements between the relevant sides should be in favor of regional peace and stability and the peace process of the peninsula. It should not harm the interests of any third parties,” Foreign Ministry spokesman Geng Shuang said in a daily briefing.

Despite ample signs of friendly relations between their people, such as the popularity of K-pop in Japan and of Japanese animation in South Korea, the nations are entangled in a history that has bred animosity.

“The weight of past history influences current relations,” said Daniel Sneider, lecturer in international policy at Stanford University, noting that generations that never directly experienced the colonial and wartime past can still be affected.

Sneider compared the situation to the divisive legacy of the U.S. Civil War, which remains relevant for many Americans. He also warned that an easy exit for the Japan-Korea tensions was not in sight.

“Korea certainly was a historical victim in that sense from the countries around it. That’s very embedded in the historical memory that is created for Koreans. It’s in their school curriculum, and it’s in their popular culture,” he said.

“They have this narrative of victimization, in which Japan certainly comes at the top of the list.”

Koichi Ishizaka, an expert on intercultural communication and a professor at Rikkyo University in Tokyo, called for more dialogue, noting that Abe likely feels he gains political points with some voters by slamming South Korea.

“The situation is escalating, and it’s hard to see how the spiraling conflict can be stopped,” he said. “Although cordial exchange between the people is working for a brighter future, politics has taken a step back and has not caught up with that.”

Liberal South Korean President Moon Jae-in has declared that his country will “never again lose” to Japan, although he later softened his tone and said he was willing to talk with Tokyo.

South Koreans have held massive rallies and started a boycott of Japanese products.

The tit-for-tat actions could lead to economic damage that’s bigger for South Korea than Japan. Major South Korean manufacturers, including Samsung, rely heavily on materials and components imported from Japan.

___

Associated Press writers Hyung-jin Kim in Seoul, Yuri Kageyama in Tokyo and Christopher Bodeen in Beijing contributed to this report.