SEOUL, South Korea (AP) — North Korean leader Kim Jong Un and South Korean President Moon Jae-in met for the second time in a month on Saturday, holding a surprise summit at a border truce village to discuss Kim’s potential meeting with President Donald Trump, Moon’s office said.

Kim and Moon met hours after South Korea expressed relief over revived talks for a summit between Trump and Kim following a whirlwind 24 hours that saw Trump cancel the highly anticipated meeting before saying it’s potentially back on.

The quickly arranged meeting seemed to demonstrate Kim’s urgency to secure a summit with Trump, which may provide his best shot at saving his economy from crushing sanctions and win security assurances in a region surrounded by enemies, analysts say.

It remains unclear whether Kim would ever agree to fully abandon his nuclear arsenal in return. Moon has insisted Kim can be persuaded to abandon his nuclear facilities, materials and bombs in a verifiable and irreversible way in exchange for credible security and economic guarantees.

Moon, who brokered the summit between Washington and Pyongyang, likely used Saturday’s meeting to confirm Kim’s willingness to enter nuclear negotiations with Trump and clarify what steps Kim has in mind in the process of denuclearization, said Hong Min, a senior analyst at Seoul’s Korea Institute for National Unification.

“While Washington and Pyongyang have expressed their hopes for a summit through published statements, Moon has to step up as the mediator because the surest way to set the meeting in stone would be an official confirmation of intent between heads of states,” Hong said.

South Korean presidential spokesman Yoon Young-chan said Moon will reveal details of his meeting with Kim on Sunday.

Koh Yu-hwan, a North Korea expert at Seoul’s Dongguk University and a policy adviser to Moon, said the two leaders likely discussed bridging the gap between Washington and Pyongyang on what a deal on the North’s nuclear weapons would look like.

U.S. officials have talked about a comprehensive one-shot deal in which North Korea fully eliminates its nukes first and receives rewards later. But Kim, through two summits with Chinese President Xi Jinping in March and May, has called for a phased and synchronized process in which every action he takes is met with a reciprocal reward from the United States.

Koh said Moon would try to persuade Kim to accept an alternative approach advocated by Seoul, in which the North’s comprehensive commitment and credible actions toward denuclearization are followed by a phased but compressed process of declaration, inspection and verifiable dismantling. Before he canceled the summit, Trump this past week did not rule out an incremental approach that would provide incentives along the way to the North.

Trump tweeted earlier Saturday that a summit with Kim, if it does happen, will likely take place on June 12 in Singapore as originally planned.

Following an unusually provocative 2017 in which his engineers tested a purported thermonuclear warhead and three long-range missiles theoretically capable of striking mainland U.S. cities, Kim has engaged in a flurry of diplomatic activity in recent months. In addition to his summits with Moon and Xi, Kim also has had two meetings with U.S. Secretary of State Mike Pompeo.

It wasn’t immediately clear how the rival Koreas organized what appeared to be an emergency summit. Ahead of their first meeting last month, Kim and Moon established a hotline that they said would enable direct communication between the leaders and would be valuable to defuse crises, but it was unclear whether it was used to set up the latest meeting.

Photos released by South Korea’s presidential office showed Moon arriving at the North Korean side of the Panmunjom truce village and shaking hands with Kim’s sister, Kim Yo Jong, before sitting down with Kim for their summit.

Moon was accompanied by his spy chief, Suh Hoon, while Kim was joined by Kim Yong Chol, a former military intelligence chief who is now a vice chairman of the North Korean ruling party’s central committee tasked with inter-Korean relations.

The two leaders embraced as Moon departed.

Moon’s office said that during their two-hour meeting, the two leaders also discussed carrying out the peace commitments they agreed to at their first summit, held at the South Korean side of Panmunjom on April 27, but didn’t elaborate.

At their first meeting, Kim and Moon announced vague aspirations for a nuclear-free Korean Peninsula and permanent peace, which Seoul has tried to sell as a meaningful breakthrough to set up the summit with Trump.

But relations between the two Koreas chilled in recent weeks, with North Korea canceling a high-level meeting with Seoul over South Korea’s participation in regular military exercises with the United States and insisting that it will not return to talks unless its grievances are resolved.

South Korea was caught off guard by Trump’s abrupt cancellation of his summit with Kim, with the U.S. president citing hostility in recent North Korean comments. Moon said Trump’s decision left him “perplexed” and was “very regrettable.” He urged Washington and Pyongyang to resolve their differences through “more direct and closer dialogue between their leaders.”

Trump’s back-and-forth over his summit plans with Kim has exposed the fragility of Seoul as an intermediary. It fanned fears in South Korea that the country may lose its voice between a rival intent on driving a wedge between Washington and Seoul and an American president who thinks less of the traditional alliance with Seoul than his predecessors did.

Trump’s decision to pull out of the summit came just days after he hosted Moon at the White House, where he openly cast doubts on the Singapore meeting but offered no support for continued inter-Korean progress, essentially ignoring the North’s recent attempts to coerce the South.

In a letter to Kim announcing the cancellation, Trump objected specifically to a statement from senior North Korean diplomat Choe Son Hui. Choe had referred to Vice President Mike Pence as a “political dummy” for earlier comments he made about North Korea and said it was up to the Americans whether they would “meet us at a meeting room or encounter us (in a) nuclear-to-nuclear showdown.”

North Korea issued an unusually restrained and diplomatic response to Trump, saying it was still willing to sit for talks with the United States “at any time, (in) any format.”

“The first meeting would not solve all, but solving even one at a time in a phased way would make the relations get better rather than making them get worse,” North Korean Vice Foreign Minister Kim Kye Gwan said in a statement carried by the North’s official Korean Central News Agency, which mainly targets an external audience.

Notably, the statement did not appear in Saturday’s edition of Rodong Sinmun, which is the official mouthpiece of the North’s ruling party and is widely read by North Koreans.