TOKYO—South Korea said it would remain in an intelligence-sharing pact with Japan, suspending a decision to pull out after an intense U.S. lobbying effort that sought to prevent a fracture between its allies that would aid China and North Korea.

The decision, announced six hours before the agreement was due to expire, marks a cooling off from a bitter series of disputes over trade, history and security that have seen ties between the Asian neighbors spiral downward to a near-complete diplomatic breakdown.

An array of senior U.S. officials tried to intervene to bridge differences between the sides. On Thursday in Asia, Secretary of State Mike Pompeo spoke with South Korean Foreign Minister Kang Kyung-wha by phone, including about the intelligence pact.

In apparent recognition that withdrawal from the intelligence agreement could hurt its ties with Washington as well as Tokyo, South Korean President Moon Jae-in convened a national security council meeting on Friday to re-evaluate the decision.

“This is due to President Moon’s and our government’s stance that we consider normalizing relations with Japan to be very important,” a senior South Korean official told reporters.