TOKYO — In a sign that relations between Japan and South Korea might be improving after months of escalating tensions, Seoul decided at the last minute on Friday to temporarily extend a military intelligence-sharing pact with Japan that South Korea had vowed to abandon in August.
South Korea’s planned withdrawal from the three-year-old pact — a serious rupture between two close American allies — was set to go into effect by midnight Friday. Just hours before the deadline, officials decided to reverse their decision for now. The reversal comes on the eve of a meeting of Group of 20 foreign ministers in Nagoya, Japan.
Seoul took the action as Japan announced that it would resume talks with South Korea over export controls. Tokyo had imposed trade restrictions on shipments of certain products to South Korea and removed it from a list of favored trading partners as the tensions escalated.
Officials in the administration of South Korea’s president, Moon Jae-in, emphasized that the decision was temporary and could change depending on subsequent negotiations with Japan. “We made our decision on the premise that we can terminate GSOMIA any time,” said Kim You-geun, the deputy director of South Korea’s National Security Council, referring to the pact, the General Security of Military Information Agreement.
The move on the intelligence-sharing agreement came as American officials had intensified their lobbying of Seoul to remain in the pact, which the two nations entered into in 2016 in part to ensure tighter monitoring of North Korea’s missile program.
This month, Defense Secretary Mark T. Esper visited Seoul and publicly exhorted his South Korean counterpart to stay in the pact.
Japanese officials had also encouraged South Korea to remain in the agreement, urging Seoul to make a “wise decision.” But on Friday, Yoichi Iida, a Japanese trade official, insisted that Japan’s action on the trade front was not linked to the extension of the intelligence-sharing agreement.
“We did not compromise,” he said.
Analysts said Seoul’s last-minute decision seemed to signal a return of the United States to diplomatic leadership in the region after a long period in which the Trump administration had been reluctant to get involved in repairing the rift between its two East Asian allies.
“The South Korean government was pushed hard by the United States government, especially the professionals” in the State and Defense Departments, said Lully Miura, the chief executive of Yamaneko Research Institute, a think tank in Tokyo.
Intelligence sharing between Japan and South Korea allows both countries to swap information about North Korean missile launches and about military actions by China. Washington strongly supports the agreement as a pillar of stability in the region.
Shinzo Abe, Japan’s prime minister, described South Korea’s decision on Friday as “strategic” in view of the need to cooperate “to take measures against North Korea.”
Seoul’s decision in August to leave the pact came as disagreements with deep historical roots flared between the two countries, pushing ties to their lowest point in years.
South Korea said the Japanese trade restrictions were aimed at pressuring it to resolve outstanding disputes over the legacy of Japan’s occupation of the Korean Peninsula. Seoul responded with its own trade actions against Tokyo, before sending the tensions to a peak by announcing its intention to leave the military agreement.
At the time, Mr. Kim, of South Korea’s National Security Council, said the trade restrictions imposed by Japan had “caused an important change in security-related cooperation between the two countries,” adding that staying in the pact “does not conform with our national interest.”
Friday’s decision by South Korea and Japan’s call to resume trade talks indicated that both sides wished to cool tensions.
“At least it shows that both sides understand that they were heading towards a cliff and that once they jumped off there was no going back,” said Daniel C. Sneider, a lecturer in international policy at Stanford University. “It doesn’t mean that there is any fundamental solution here. That still requires a fair bit of statesmanship and leadership on the part of both governments.”
Ken Jimbo, a professor of international relations at Keio University in Tokyo, said that the last-minute decision, orchestrated with competing news conferences in Seoul and Tokyo, showed “a lot of Kabuki theater going on here,” but that it at least demonstrated that both sides were ready to negotiate.
Within South Korea, some politicians had opposed the decision to withdraw from the pact. Hwang Kyo-ahn, the head of the main conservative opposition Liberty Korea Party, had been on a hunger strike near Mr. Moon’s office since Wednesday, protesting that Mr. Moon’s foreign policy, particularly his decision to end the pact, was undermining South Korea’s alliance with Washington.
Shortly after South Korea made its decision on Friday, Mr. Moon sent an aide to Mr. Hwang asking him to stop his hunger strike.
Reporting was contributed by Choe Sang-Hun from Seoul, South Korea; and Makiko Inoue, Hisako Ueno and Eimi Yamamitsu Tokyo.