Donald Trump has invited Kim Jong-un to the US after becoming the first sitting American president to enter North Korea.

The apparently impromptu meeting came about after Trump tweeted an invitation to Kim on Saturday from the G20 summit in Osaka, Japan.

After shaking hands with Kim in the demilitarised zone (DMZ) between the two Koreas and walking with him over the border, Trump said: “Stepping across that line is a great honour. Great progress has been made, great friendships have been made and this has been, in particular, a great friendship.”

Facebook Twitter Pinterest Trump with the South Korean president, Moon Jae-in, after holding talks with Kim Jong-un. Photograph: YONHAP/EPA

Following a trilateral meeting between Kim, Trump and the South Korean president, Moon Jae-in, Trump later said he agreed with Kim to restart talks after nuclear negotiations stalled earlier this year and had invited him to the US “when the time is right”.

Trump said he and Kim were “not looking for speed. We’re looking to get it right.” He added: “We are going to have teams, they are going to meet over the next weeks, they are going to start a process and we will see what happens.”

He said sanctions would remain in place, but suggested Washington might be willing to offer concessions in return for piecemeal North Korean moves towards denuclearisation – an approach it had previously rejected. “At some point during the negotiation things can happen,” he said.

Kim said the meeting at the heavily armed border, which was originally supposed to be a brief exchange of pleasantries but lasted almost an hour, was symbolic of warming ties between the US and North Korea.

“I think meeting here, two countries that have a hostile past, we are showcasing to the world that we have a new present and we have a positive meeting going forward,” he said.

The main source of tension appeared to be between US reporters and North Korean security guards.

The jostling seen outside when Kim and Trump met worsened when North Korean guards tried to physically prevent reporters with the US press pool from entering a room inside the Freedom House on the southern side of the DMZ where the two leaders were about to start their meeting. Reports said the Secret Service had to intervene.

Those roughed up in the scuffle included the new White House press secretary, Stephanie Grisham, who ended up with bruises.

Play Video 0:24 White House press secretary jostles with North Korean security – video

Earlier, in the South Korean capital, Seoul, Trump said he was “looking forward to [the meeting] very much … He understands me and I think I maybe understand him.”

“We have a very good relationship, the two of us,” he added, referring to Kim. “I want to say hello. Let’s see what happens … It will be very short but that’s OK. A handshake means a lot.”

Moon said ahead of the talks that even a handshake and brief encounter between Trump and Kim “would be a significant milestone in the peace process on the Korean peninsula”.

Trump proposes meeting with Kim Jong-un in demilitarised zone Read more

He said he could “really feel that the flower of peace was truly blossoming on the Korean peninsula”.

Moon later told a joint press conference he was “overwhelmed” with emotion about the meeting at the border village of Panmunjom. He described Trump and Kim as “so brave”, adding: “I hope President Trump will go down in history as the president who achieves peace on the Korean peninsula.”

Trump said at the G20 in Osaka on Saturday that he would have “no problem” stepping into North Korea with Kim. In 2018 Kim had invited Moon to walk over the military demarcation line that forms the border between the Koreas.

Trump is the first sitting US president to step across the border, and the gesture represents a public relations coup for Kim, who has held summits with Trump, the Chinese president, Xi Jinping, and the Russian president, Vladimir Putin, in the past year.

Trump and Kim first met in Singapore last year in a blaze of publicity – the first encounter between a leader of nuclear-armed North Korea and a sitting US president. The two countries’ forces and their allies fought each other to a stalemate in the 1950-53 Korean war.

The Singapore summit produced a vaguely worded pledge about denuclearisation, but a second meeting in Hanoi in Vietnam in February broke up abruptly without agreement.

Contact between the two sides has since been minimal, with Pyongyang issuing frequent criticisms of the US position, but the two leaders have exchanged a series of letters.

Facebook Twitter Pinterest South Korean soldiers at the border village of Panmunjom in the DMZ. Photograph: Lee Jin-man/AP

The 2.5-mile-wide DMZ, which runs for 150 miles, is where the frontline lay when the Korean war ended in 1953, with a ceasefire rather than a peace treaty. It is described as the world’s last cold war frontier.

Trump claimed before he crossed the border that both North and South Korea had benefited from his attempts to engage Kim since he became president. “North Korea and South Korea are both in much better places than they were two and a half years ago,” he said. “It’s day and night.”

“Lots of good things are happening with North Korea,” he told South Korean business leaders, repeating his belief that the US “would have been at war with North Korea” if someone else had been elected to the White House.

However, Robert Kelly of South Korea’s Pusan National University derided Trump’s invitation to Kim as “emblematic of why the Trump NK effort is a farce: thrown together; last-minute; made for TV”.

It was driven by Trump’s “lust for optics and drama rather than substance” and “a photo op for the 2020 election”, he tweeted.

But John Delury of Yonsei University in Seoul said a meeting in the “barren no man’s land that embodies the unhealed wound of post-WWII division, the Korean war, and 70 years of animosity” would help improve ties.

“It’s not just about denuclearisation and it’s not all about a deal – important as those are,” he said. “If Trump and Kim meet and can announce some kind of interim agreement, that’s great. If they meet and don’t, that’s OK too. If in the end they don’t meet, it’s good that Trump offered to.”

James Clapper, the US Director of National Intelligence under Barack Obama, said he did not believe the meeting would yield progress in talks. “I personally don’t believe the North Koreans have long term any intent to denuclearise,” he told CNN. “Why should they? It’s their ticket to survival and they’re just not going to do that.”

On Sunday morning, Trump also hailed the trade talks with Xi at the G20 in Japan on Saturday as having gone “far better than expected” and vowed to hold off on further tariffs as negotiations with China continued.

Donald J. Trump (@realDonaldTrump) I had a great meeting with President Xi of China yesterday, far better than expected. I agreed not to increase the already existing Tariffs that we charge China while we continue to negotiate. China has agreed that, during the negotiation, they will begin purchasing large.....

“The quality of the transaction is far more important to me than speed. I am in no hurry, but things look very good!” Trump tweeted on Sunday.

The economic ceasefire halting damaging trade frictions came after the highly anticipated meeting between the two leaders of on the sidelines of the G20 summit.

Washington confirmed it would not impose any further tariffs on Beijing’s exports. On Sunday Trump reiterated that China had agreed to buy “large amounts of agricultural products from our great farmers”.

“Importantly, we have opened up negotiations again with China as our relationship with them continues to be a very good one,” he tweeted.