SEOUL — In a policy recalibration made under U.S. pressure, South Korea said Friday that it will maintain an intelligence-sharing pact with Japan for the time being, although the two sides remained far from resolving a bitter dispute over Tokyo’s wartime use of forced labor.

Seoul’s announcement that it would suspend its decision to terminate the General Security of Military Intelligence Agreement (GSOMIA) came hours before the pact was due to expire at midnight local time.

The decision not to renew the pact, announced three months ago, drew intense criticism from Washington, which maintains that intelligence-sharing between its two most important Asian allies is crucial to countering threats from North Korea and China.

Earlier this week, U.S. Ambassador Harry Harris told the Yonhap news agency that South Korea’s actions put U.S. troops at risk.

Seoul’s postponement of its exit from the pact was conditional, however, including a restatement of its demand that Japan reverse a move to place controls on its exports to South Korea. Friday’s announcement could be seen as giving the two sides space to find a solution to their quarrel, or as simply kicking the can a little farther down the road.

“It's not over yet. They’re buying some time with conditions,” said Duyeon Kim, a senior adviser with the International Crisis Group. “Establishing a dialogue channel is a step in the right direction, but it’s currently difficult to see a way out that compels Seoul to stay in GSOMIA.”

Kim You-geun, a deputy director of the presidential National Security Council, said Seoul and Tokyo would hold talks on the export-control issue and South Korea would suspend a petition to the World Trade Organization against Japan’s export curbs.

But he said Friday’s suspension stipulated that the “South Korean government can terminate the pact at any time.”

The dispute between the two countries flared last year after South Korea’s Supreme Court ruled that Japanese companies should pay compensation for their use of South Korean forced labor during Japan’s colonial occupation from 1910 to 1945. Japan insists that all wartime grievances were settled as part of an economic package it gave South Korea in 1965 when the countries established diplomatic ties as a result.

The dispute has since escalated into a tit-for-tat fight fueled by nationalist sentiment in both countries. Japan struck at South Korea’s status as a trusted trading partner, first imposing restrictions on South Korea-bound exports of security-related products, and then removing South Korea from a “white list” of countries that are trusted to import goods that may have military uses.

South Korean President Moon Jae-in said this week that if Japan wants to keep GSOMIA, it will have to cooperate with his government by removing the export controls, which Tokyo said were imposed because of security concerns.

“It is self-contradictory to ask for sharing of military intelligence while calling South Korea untrustworthy in the security domain,” Moon said.

The prospect of South Korea’s court ordering the liquidation of assets held by Japanese companies to finance compensation is another looming flash point.

Reacting to Friday’s announcement, Japanese Prime Minister Shinzo Abe said South Korea made a “strategic decision” in sticking with the intelligence-sharing pact and that bilateral relations are vital.

Japan’s Trade Ministry said it hopes to hold talks with South Korea on export controls but that it will not immediately put South Korea back on the trade “white list” that fast-tracks exports, Reuters reported.

Japanese Foreign Minister Toshimitsu Motegi, speaking in Nagoya at a Group of 20 ministerial meeting, said security cooperation between the two countries is crucial.

“My understanding is that the South Korean government took this strategic decision, given the current security environment,” Motegi told reporters, according to Reuters. But Motegi rejected a link between GSOMIA and trade controls, calling them “separate issues,” Japanese media reported.

Duyeon Kim, the Crisis Group analyst, said that any decision by South Korea to terminate GSOMIA would undermine its own security. If that happens, “the winners will be China, North Korea and Russia, and the loser will be South Korea,” she said.