Donald Trump became the first sitting US President to set foot in North Korea when he met its leader, Kim Jong-un, in the Demilitarised Zone between the two Koreas and agreed to resume stalled nuclear talks.

The two men shook hands warmly and expressed hopes for peace when they met for the third time in just over a year on the old Cold War frontier that for decades has symbolised the hostility between their countries, which are technically still at war.

President Trump, escorted by Mr Kim, briefly crossed a military demarcation line into the North.

Moments later, they returned to the South Korean side and joined South Korea's President Moon Jae-in for a brief chat, marking an unprecedented three-way gathering.

Mr Trump and Kim Jong-un then held a closed-door meeting for nearly an hour.

Speaking after the meeting, Mr Trump said: "The meeting was a very good one, very strong ... We agreed to work out details," 

"We'll see what can happen."

He said both sides would set up teams to push forward stalled talks aimed at getting North Korea to give up its nuclear weapons, adding he was in no rush for a deal.

The two leaders met for the first time in Singapore in June last year and agreed to improve relations and work towards the denuclearisation of the Korean peninsula.

But there has been little progress since then.

The second summit in Hanoi, Vietnam, in February broke down after the two sides failed to narrow differences between a US demand for North Korea to give up its nuclear weapons and a North Korean demand for sanctions relief.

Mr Kim looked relaxed and smiled as he chatted with President Trump amidst a throng of press photographers, aides and bodyguards.

Kim Jong-un shakes hands with South Korea's President Moon Jae-in

Mr Trump arrived in South Korea late yesterday for talks with South Korean leader Mr Moon after attending a Group of 20 summit in Osaka, Japan, during which he made the surprise, spur-of-the-moment offer to meet Mr Kim, who accepted it.

They met in the so-called Joint Security Area (JSA), which is patrolled by soldiers from both Koreas. Mr Moon joined the two after their initial handshakes.

Mr Trump said he had "plenty of time" and was in "no rush" to reach a deal.

"We want to get it right," he said.

North Korea has pursued nuclear and missile programmes for years in defiance of UN Security Council resolutions, and easing tensions with North Korea is one of the US President's top foreign policy priorities.

The DMZ was set up after the 1950-53 Korean War ended in an armistice, not a truce, leaving North Korea and a US-led UN forces still technically at war.