SEOUL/NAGOYA    -    South Korea on Friday made a last-minute decision to stick with its critical intelligence-sharing deal with Japan, a dramatic reversal after months of frigid relations complicated by painful, wartime history.

The decision, announced by South Korea’s presidential Blue House, is likely to be hailed by Washington. The United States has pressured its two Asian allies to set aside their feud and maintain the General Security of Military Information Agreement (GSOMIA), seen as linchpin of trilateral security cooperation.

The diplomatic thaw also has implications for trade. As the rift worsened this year, Japan put export curbs on materials used to make semiconductors, threatening the global supply chain of chips, a pillar of the South Korean economy.

Seoul decided to suspend a previous notice to Japan that it would stop sharing intelligence once the current pact ran out at midnight on Friday, Kim You-geun, deputy director of South Korea’s national security office said, adding it had done so on the condition the agreement could be terminated at any time.

“Japan has expressed its understanding,” Kim told a briefing just hours before the deal was due to end. Japanese Prime Minister Shinzo Abe said South Korea had made a “strategic decision” in sticking with the pact and that bilateral relations were vital.

News of the decision quickly overshadowed the Group of 20 (G20) foreign minister meetings being held in the central Japanese city of Nagoya. In almost unheard of move, Japanese Foreign Minister Toshimitsu Motegi briefly stepped out of a bilateral meeting with his Russian counterpart to address reporters.

“My understanding is that the South Korean government took this strategic decision, given the current security environment,” Motegi said, adding he would meet the South Korean foreign minister during the G20.

South Korea’s foreign minister, Kang Kyung-wha, had been notable for her absence at the G20. Her attendance had not been formally confirmed and she only arrived in Nagoya late on Friday, after the decision had been announced.

As the news broke, Japanese reporters stepped away from their laptops in the G20 media centre to huddle around a television.

The dispute has its roots in a decades-old disagreement over compensation for South Korean labourers forced to work at Japanese firms during World War Two. It has deepened this year, and upended trade between the two countries.

South Korea was the third-largest market for Japanese exports last year, accounting for $53 billion, according to IMF data. Japan remains a major player in specialised chip components, even though it was overtaken as a chipmaker years ago by South Korea.

Japan’s trade ministry said it hoped to hold talks with South Korea on export controls but it would not immediately put Seoul back on the trade “white list” that fast-tracks exports to its neighbour.