South Korea said it would withdraw from an intelligence-sharing agreement with Japan, extending their feud over trade measures and historical grievances into security cooperation.

South Korea will file a notice to withdraw from the three-year-old framework for exchanging classified military information with its neighbour, Deputy National Security Director Kim You-geun said. The move came despite the urging of US officials including President Donald Trump for the two allies to work together amid shared security challenges from China and North Korea.

Kim cited Japan’s recent decision to remove South Korea from a list of trusted export countries, saying it brought about a significant change to the environment of defence cooperation. “South Korea judged that maintaining an agreement meant for the exchange of sensitive military information is not fitting for our national interests,” Kim said.

The decision shows the growing stakes for the unprecedented feud between Japan and South Korea, which has already escalated from diplomatic sniping to trade measures that could threaten global supply chains. While the impact of withdrawing from the pact was unclear, it underscored the hurdles that Washington faces in getting the neighbours to work together on regional security initiatives.

Relations between the two countries have sunk to their lowest point in decades since the South Korean Supreme Court ruled a Japanese company was liable to pay compensation to Korean former conscripted workers and their families. Japan says all such claims were settled under a 1965 treaty, while the South Korean courts said that agreement did not cover emotional pain and suffering.

Since then, Japan has announced tighter checks on exports to South Korea, citing national security concerns — while Seoul has moved in return to strip Japan from a list of trusted export destinations. South Korea had framed its rethinking of the pact as retaliation for Japan’s tighter export controls.

The General Security of Military Information Agreement, or GSOMIA, between Japan and South Korea was signed in November 2016, after Seoul cancelled a previous attempt at the last minute in 2012. The agreement allows, but doesn’t require, the exchange of intelligence.

Japanese Foreign Minister Taro Kono said Wednesday after a meeting with his South Korean counterpart Kang Kyung-wha in Beijing that the pact was important and should be retained.

South Korea’s Defence Minister, Jeong Kyeong-doo, told the National Assembly’s Defence Committee on August 5 that there had been 26 instances of intelligence-sharing with Japan since the agreement was signed. He played down its practical importance, telling the committee the pact was more about relationships than utility.

Japan has similar agreements on military information with other countries, including the US and Australia.