Donald Trump will be heading to Seoul immediately after the G20 summit in Osaka. (FILE PHOTO)

US President Donald Trump on Saturday invited North Korean leader Kim Jong Un to meet for a historic handshake at the demilitarised zone between North and South Korea, in what he said was a spontaneous offer.

The spectacular invitation on Twitter caught observers by surprise. If Kim accepts, it would be the third meeting between the leaders of the two former enemies amid efforts to denuclearise the Korean peninsula.

The official KCNA news agency quoted Vice Foreign Minister Choe Son Hui as saying the offer was "a very interesting suggestion" but that no official request had been received.

Trump lobbed the shock offer on Twitter from the G20 summit in Osaka, saying: "if Chairman Kim of North Korea sees this, I would meet him at the Border/DMZ just to shake his hand and say Hello(?)!"

The president later told reporters he "just thought of it this morning" but the offer came amid a recent flurry of diplomacy over North Korea's nuclear programme after a Trump-Kim summit in Hanoi collapsed without an agreement.

Speculation grew that something was afoot when US Secretary of State Mike Pompeo skipped a G20 dinner late Friday without giving a reason.

"We'll see. If he is there, we will see each other for two minutes," said Trump, adding: "I just put out a feeler because I don't know where he is right now, he may not be in North Korea."

"We seem to get along... That's a good thing, not a bad thing," added the president.

North Korea's Choe said if a meeting took place it would be "another meaningful occasion in further deepening the personal relations between the two leaders and advancing the bilateral relations."

Although Twitter is banned from the general public in the North, those in leadership, including Kim Jong Un, should have access to social media including Twitter, said Ahn Chan Il, a former defector and now a researcher in Seoul.

"They have a separate office that regularly monitors them," he said.

The South's presidential Blue House said nothing had been confirmed at this point and added: "Our position, which hopes for a dialogue between the US and North Korea to take place, remains unchanged."

After several months of public silence, an exchange of letters between the leaders appears to have thawed the deep-freeze and raised hopes for a third summit after a historic first tete-a-tete in Singapore on June 12, 2018 and the second in Hanoi in February.

Trump will be heading to Seoul immediately after the G20 summit in Osaka, where on Saturday he held a highly anticipated meeting with Chinese President Xi Jinping in a bid to ease trade tensions between the world's top two economies.

According to South Korea's Unification minister, Kim and Trump have exchanged a total of 12 letters since the beginning of last year, with Kim the more assiduous suitor in their nuclear bromance, penning eight of those.

Last week, Xi visited Pyongyang for a highly symbolic summit with Kim. Analysts say that diplomatic breakthroughs often follow on from such meetings.

The Hanoi summit foundered amid disagreements on what the North would be willing to give up in exchange for sanctions relief.

The two sides blamed each other for the breakdown but Washington has said they are prepared to meet the North Koreans at any time without preconditions to keep diplomacy alive.

"Nothing could happen"

Apparently voicing his frustration at the diplomatic stalemate, Kim responded by firing off several short-range "projectiles" that Trump shrugged off.

The North last carried out a missile test in November 2017, before a rapid diplomatic rapprochement saw tensions ease on the peninsula.

The DMZ was witness to extraordinary scenes during a summit between Kim and South Korean President Moon Jae-in when the North's young leader invited his counterpart to step across the border in an emotional symbol of unity after decades of aggression.

Referring to the DMZ, Trump said: "By the way, you talk about a wall, when you talk about a border, that's what they call a border."

"Nobody goes through that border... that's called a real border."

Writing on Twitter, analyst Ankit Panda of the Federation of American Scientists said: "I guess the best case outcome is that a meeting happens and some of the non-denuclearisation matters that had been agreed in Hanoi... see progress."

He cited a possible declaration of the end of the Korean War that technically ended with a ceasefire, as well as the establishment of liaison offices as a first step towards normalising ties between the historic foes.

"Of course, nothing could happen at all too," said Panda.