North Korean leader Kim Jong-un and South Korean president Moon Jae-in have held a surprise meeting at a border village amid efforts to salvage the high-stakes summit with US president Donald Trump.

The two-hour talks, which were not announced ahead of time, marked the latest twist in a dramatic week of back-and-forth surrounding the unprecedented talks between Mr Trump and Mr Kim, which had been set for 12 June in Singapore.

On Thursday, Washington said it was pulling out of the summit, with Mr Trump citing the “open hostility” of recent comments out of Pyongyang. The president seemingly took exception to a statement by North Korean diplomat Choe Son Hui, who referred to Vice President Mike Pence as a “political dummy” and said it was up to the Americans whether they would “meet us at a meeting room or encounter us at a nuclear-to-nuclear showdown”.

North Korea responded that it was still willing to meet “at any time” and in “any format”, a pronouncement that Mr Trump called “very nice” before tweeting on Friday afternoon that his administration was having “very productive talks” with Pyongyang to reinstate the summit.

A statement from North Korea's state news agency KCNA said Kim expressed "his fixed will" on the possibility of meeting with Mr Trump.

In a tweet on Saturday Mr Trump hit out at a report from The New York Times quoting a Senior White House official saying that if the summit is reinstated it would be “impossible” to hold it on 12 June given the planning required at such short notice. “WRONG” the president wrote, offering no evidence to back up his claim.

Given the nature of the interactions between the Trump administration and North Korea – which have veered from threats of “fire and fury” by the US president and responses in kind from Pyongyang, to suggestions the two nations could work together – the key could be Mr Moon.

The South Korean president was voted into office on a policy platform of seeking to engage with the North, and he has followed that through. From the participation of Pyongyang in the Winter Olympics in South Korea earlier this year to the latest meeting, Mr Moon has sought to make himself the mediator in trying to solve the crisis. He has flattered Mr Trump by praising his strong leadership and “maximum pressure” campaign through sanctions as reasons Mr Kim has been brought to the negotiating table, but it is obvious that North-South relations are on a surer footing than North Korea-US relations.

The meeting between Mr Moon and Mr Kim on Saturday was the second between the two leaders, with both having taken place in the last few weeks. The first inter-Korean summit in more than a decade took place at Panmunjom border village on 27 April, when both sides declared an aspiration to work towards a nuclear-free Korean peninsula and formally end the 1950-53 Korean War.

It is the North’s nuclear programme that has been the focus of the US administration, with more than 20 missile tests from Pyongyang in 2017 highlighting the progress the nation has been making towards a nuclear warhead-tipped rocket that could reach the US. Indeed, amid months of escalating rhetoric between Mr Trump and Mr Kim’s regime last month, Pyongyang threatened to fire missiles at the US territory of Guam.

Donald Trump says North Korea summit 'could still happen'

Saturday’s talks again took place in Panmunjom, although it is not yet known how long the meeting lasted or who had asked for it.

“The two leaders candidly exchanged views about making the North Korea-US summit a successful one and about implementing the Panmunjom Declaration,” South Korea’s presidential spokesman said in a statement.

Mr Moon, who returned to Seoul on Thursday morning after meeting Mr Trump in Washington earlier in the week in a bid to keep the US-North summit on track, is due to announce details of the meeting with Mr Kim early on Sunday.

North Korea – South Korea relations: in pictures Show all 21 1 /21 North Korea – South Korea relations: in pictures North Korea – South Korea relations: in pictures Pukguksong-2 missile - 2 May 2017 A solid-fuel "Pukguksong-2" missile lifts off during its launch test in North Korea on May 22, 2017. They said that it was examining operational plans for attacking Guam, an angry reaction to UN punishment for previous North Korean intercontinental ballistic missile tests and a US suggestion about preparations for possible preventive attacks to stop the North's nuclear weapons program. Korean Central News Agency/Korea News Service via AP North Korea – South Korea relations: in pictures Hwasong-12 -16 September 2017 North Korean leader Kim Jong-Un inspecting a launching drill of the medium-and-long range strategic ballistic rocket Hwasong-12 at an undisclosed location. Kim vowed to complete North Korea's nuclear force despite sanctions, saying the final goal of his country's weapons development is "equilibrium of real force" with the United States, state media reported on September 16, 2017. AFP/Getty Images North Korea – South Korea relations: in pictures Donald Trump address South Korean assembly - 7 November 2017 President Donald Trump talks with South Korean President Moon Jae-In during their joint press conference at the presidential Blue House on November 7, 2017 in Seoul.Trump was the first US President to address the South Korean National Assembly since President Clinton in 1993. He addressed Kim Jong Un warning him to not underestimate the US and that for talks to materialize then Pyongyang would need to take steps into denuclearization. Getty North Korea – South Korea relations: in pictures Demilitarized Zone Haean-Myeon, is a small military town near the Demilitarized Zone (DMZ) and border between North and South Korea, in Gangwon province. The zone is a strip of land running across the Korean Peninsula and was created after the 'Korean Armistice Agreement'. Any negotiations between the two countries tend to take place in this zone. AFP/Getty Images North Korea – South Korea relations: in pictures Declared state sponsor of terrorism by Trump - 20 November 2017 President Donald Trump speaks to the media during a cabinet meeting at the White House on November 20, 2017, where he officially designated North Korea as a state sponsor of terrorism. North Korea had previously been on the list, however was removed in 2008. Getty North Korea – South Korea relations: in pictures Hwasong-15 intercontinental ballistic missile - 29 November 2017 The North Korean government launches it's Hwasong-15 intercontinental ballistic missile at an undisclosed location in North Korea on November 29, 2017. It is supposedly capable of reaching all parts of the US. Korean Central News Agency via AP North Korea – South Korea relations: in pictures Hwasong-15 intercontinental ballistic missile - 29 November 2017 North Korean leader Kim Jong-Un celebrating the launch of the Hwasong-15 missile on November 29, 2017. AFP/Getty North Korea – South Korea relations: in pictures Kim Jong-Un New Year's speech - 1 January 2018 North Korean leader Kim Jong-Un delivering his New Year's speech. He vowed North Korea would mass-produce nuclear warheads and missiles in a defiant New Year message on January 1 suggesting he would continue to accelerate a rogue weapons programme that has stoked international tensions. Korean Central News Agency via AFP/Getty North Korea – South Korea relations: in pictures Intercontinental ballistic missile ice sculpture - 1 January 2018 Fireworks are seen above the Taedong River during New Year celebrations as visitors pose for a photo in front of an ice sculpture of an intercontinental ballistic missile at the Pyongyang Ice Sculpture Festival in Kim Il Sung Square in North Korea on 1 January, 2018. REUTERS North Korea – South Korea relations: in pictures US-South Korean military drills postponed - 4 January 2018 South Korean President Moon Jae-in talks with US President Donald Trump on January 4, 2018 in Seoul. South Korea and US agreed to delay the annual "Foal Eagle" military drills until after the PyeongChang Winter Olympic Games in an effort to "de-conflict" the Games and "focus on ensuring the security" of the event. South Korean Presidential Blue House via Getty North Korea – South Korea relations: in pictures North and South Korea have first official talks in over two years - 9 January 2018 Vehicles transporting the South Korean delegation, led by South Korean Unification Ministrer Cho Myoung-Gyon, drive past a checkpoint on the road connecting South and North Korea at the Unification Bridge, near the Demilitarized zone (DMZ) separating them both on January 9, 2018 in Paju. They began their first official face-to-face talks in two years. Getty North Korea – South Korea relations: in pictures North and South Korea have first official talks in over two years - 9 January 2018 Members of the South Korea delegation (R) shake hands with members of the North Korean delegation (L) during their meeting at the border truce village of Panmunjom in the Demilitarized Zone (DMZ) dividing the two Koreas on January 9, 2018. They focused on the forthcoming Winter Olympics after months of tensions over Pyongyang's nuclear weapons programme. AFP/Getty North Korea – South Korea relations: in pictures Foreign Ministers Meeting on Security and Stability on the Korean Peninsula - 16 January 2018 Foreign Ministers from twenty countries from North and South America, Asia, and Europe pose for a photo at the Vancouver Foreign Ministers Meeting on Security and Stability on the Korean Peninsula, in Vancouver on January 16, 2018. The US urged an escalation in pressure on North Korea over its nuclear missile program, despite a more cautious tone from key US ally South Korea. Secretary of State Rex Tillerson, co-hosted the event with Canada's foreign minister Chrystia Freeland, and called for North Korean ships to be intercepted and for new punitive measures to be implemented every time Pyongyang tests new weapons. AFP/Getty North Korea – South Korea relations: in pictures North Korea and South Korea to march together at Winter Olympics - 20 January 2018 PyeongChang 2018 Olympics President Lee Hee-beom, North Korea's Sports Minister and Olympic Committee president Kim Il Guk, International Olympic Committee President Thomas Bach, South Korean Minister of Culture, Sports and Tourism Do Jong-hwan and South Korea's National Olympic Committee President Lee Kee-heung join their hands as they pose during a signing ceremony at the Olympic Museum on January 20, 2018 in Lausanne. North Korea will send 22 athletes to the Winter Games in the South. The two nations will also march together at the opening ceremony. AFP/Getty North Korea – South Korea relations: in pictures Anti-North Korea activists protest delegation arrival - 22 January 2018 Anti-North Korea activists burn a portrait of leader Kim Jong-Un during a rally Seoul Station as a North Korean delegation arrived to check out performance venues for the Winter Olympics on January 22, 2018. Protesters led by the Korean Patriots Party gathered and complained that the talks to encourage North Korea's participation is stealing the spotlight from their country to the benefit of the regime. Donga Daily via Getty North Korea – South Korea relations: in pictures Panmunjom - 7 February 2018 South Korean soldiers stand guard at the border village of Panmunjom in the Demilitarized Zone (DMZ) between South and North Korea on February 7, 2018. In a sign of thawing bilateral ties, North Korea today announced that Kim Yo-jong, the sister of North Korean leader, Kim Jong-un, will attend the opening ceremony of the PyeongChang Winter Olympic Games. Getty Images North Korea – South Korea relations: in pictures North Korean ferry arrives in South Korea - 6 February 2018 North Korean ferry Mangyongbong-92 carrying a 140-strong orchestra approaches a port in Donghae, South Korea, February 6, 2018. REUTERS North Korea – South Korea relations: in pictures Anti-North Korea protest - 6 February 2018 A member of a conservative civic group tears a portrait of North Korean leader Kim Jong Un during an anti-North Korea protest as the North Korean ferry Mangyongbong-92 carrying a 140-strong orchestra approached. REUTERS North Korea – South Korea relations: in pictures North Korea at the athletes village - 8 February 2018 A North Korean flag is seen hanging on a building at the Winter Olympics athletes village in Gangneung, South Korea. REUTERS North Korea – South Korea relations: in pictures Olympic Welcome ceremony - 8 February 2018 Democratic People's Republic of Korea Vice Sports Minister Won Gil-woo receives a gift from mayor of the Olympic Village Kim Ki-hoon during the welcome ceremony ahead of the PyeongChang 2018 Games at the Olympic Village on 8 February, 2018 in South Korea. Getty Images North Korea – South Korea relations: in pictures Mike Pence meets Moon Jae-in - 8 February 2018 US Vice President Mike Pence shakes hands with South Korean President Moon Jae-in before their meeting at the presidential office in Seoul, South Korea on 8 February, 2018. REUTERS

One of the photos released by the presidential Blue House on Saturday showed Mr Moon and Mr Kim hugging each other after their meeting at Tongilgak, the North’s building in the truce village. The previous summit was held at the southern side of the border.

They were accompanied by South Korean intelligence chief Suh Hoon and his North Korean counterpart Kim Yong Chol, who is in charge of inter-Korean affairs. Another photo showed Moon shaking hands with Kim Jong-un’s sister, Kim Yo-jong.

Mr Moon is walking a political tightrope, with decades of difficult diplomacy between world powers and the North littered with examples that show the situation can change very quickly – even without the often impulsive input of Mr Trump.

South Korea was caught off guard by Mr Trump’s abrupt cancellation of the Singapore summit. Mr Moon said the US president’s decision left him “perplexed” and was “very regrettable”. Mr Moon’s push to keep the 12 June summit on track may also be driven – at least in part – by the worry of a US president who thinks less of the traditional alliance with Seoul than his White House predecessors.

A number of analysts have highlighted what they see as the risky nature of Mr Trump’s cancellation of the Singapore meeting and how it could play into Mr Kim’s hands in terms of propaganda value. Adam Mount, a senior fellow at the Federation of American Scientists and director of its Defense Posture Project, which looks at deterrence and the use of nuclear weapons, said that Mr Moon’s latest meeting with Mr Kim was a “clear demonstration of how dangerous Trump’s temper tantrum was”.

“When Kim Jong-un was allowed to split the negotiations into separate tracks with Trump and Moon, he gained leverage over both,” Mr Mount tweeted. “Moon was sitting too alone at the table today, without the full weight of the United States.”

However, the White House sought on Saturday to make clear it was still preparing for the summit, with reports of an advance team of around 30 White House and State Department staff preparing to leave for Singapore over the weekend.

In a statement, White House Press Secretary Sarah Sanders said: “The White House pre-advance team for Singapore will leave as scheduled in order to prepare should the summit take place.”

On Friday, Mr Trump was asked if North Korea was playing games with the US over the status of the summit, and he replied that “everyone plays games”. But for Mr Moon the stakes are much higher.