Seoul(CNN) President Donald Trump shook hands with Kim Jong Un on Sunday and took 20 steps into North Korea, making history as the first sitting US leader to set foot in the hermit kingdom.

Trump crossed the low stone curb separating the North and South at 3:45 p.m. local time, making his way alongside a grinning Kim into a country that's long been a global pariah for its nuclear ambitions and dismal record on human rights.

The event, seemingly spontaneous and broadcast live, took to a new level Trump's showman instincts and view of diplomacy as a test of interpersonal skills. Afterward, Trump said he agreed with Kim to revive staff-level talks that had collapsed after their last summit in February.

The encounter at the heavily fortified Korean Demilitarized Zone -- their third in person -- came a day after Trump raised the prospect of a border handshake in a tweet and declared he'd have "no problem" stepping into North Korea.

"Would you like me to step across?" Trump asked Kim as they shook hands. "I am OK with it."

While inside North Korean territory, Trump and Kim shook hands and patted each other's backs before returning across the border to the South after about a minute.

"I never expected to meet you at this place," Kim, who appeared overjoyed in the moment, told Trump through an interpreter.

Later, Trump said he was "proud to step over the line" and thanked Kim for the meeting. He invited him to the White House, though later acknowledged such a visit would likely not come soon.

The North Korean leader said he was surprised by Trump's request to meet, and accepted the offer due to their "excellent relationship" and the significance of meeting at the border.

"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.

After the historic handshake, the two men met inside the Freedom House at the DMZ for just under an hour -- a more substantial session than Trump previewed earlier when he said his encounter with Kim would amount to little more than a handshake.

The moment marks a milepost in the United States' fraught history with North Korea, but what it means beyond a display of friendship wasn't immediately clear.

The North Korean government praised Trump's "historic" meeting and handshake with Kim as an "amazing event" in the country's first acknowledgment of the talks at Panmunjom, North Korean state news agency KCNA reported Sunday.

Kim said that it was the "good personal relations with Trump that made such a dramatic meeting possible," according to KCNA.

The North Korean government went on to explain how the "bold" decision by Kim and Trump created "an unprecedented trust between the two countries which had been antagonizing each other with deep rooted hostility," KCNA reported.

There did not appear to be any new commitments made in Trump's 50-minute meeting with Kim beyond an agreement to restart talks. And Trump himself said afterward he was in no rush to rid North Korea of its nuclear weapons.

Still, the meeting and historic border crossing have broken a stalemate in the talks that hasn't broken since Trump walked out of his last meeting with Kim in Vietnam four months ago.

Trump said negotiating teams would begin meeting in a matter of weeks.

The US team will be led by the current US special representative for North Korea, Stephen Biegun, Trump said. Turning to Biegun, Trump wished him luck.

US President Donald Trump steps into the northern side of the Military Demarcation Line that divides North and South Korea as North Korea's leader Kim Jong Un looks on.

Confirmation came after back-and-forth

Trump arrived to the border zone about an hour after he confirmed he would meet with Kim, and used an observation platform to peer into the North.

Standing alongside his South Korean counterpart, he appeared somber as he listened to a US military official, who pointed at landmarks in the distance.

"It used to be very, very dangerous," Trump said, citing his briefing. "After our first summit, the danger went away."

Even with history in the air, Trump did not avoid criticizing the media, claiming he wasn't given credit for improving relations with Pyongyang.

"When they say there's been no difference, there's been a tremendous difference," he griped. "I say that for the press, they have no appreciation for what is being done, none."

The meeting along the fenced and barbed wire-topped border came after a morning of back-and-forth over whether the brief greeting would transpire after Trump on Saturday issued a public invitation for a handshake.

On Sunday morning, Trump framed the question of whether he'd actually meet Kim as a matter of logistics, indicating both sides were sorting arrangements to make the handshake happen.

Such a meeting was once unthinkable

The prospect of a US president stepping over the world's most heavily fortified border into North Korea would once be unthinkable. But it's in keeping with Trump's deeply personal style of diplomacy and his flair for orchestrating drama around those efforts.

Still, some diplomats even in Trump's own administration were caught off guard when he tweeted the invitation for Kim to meet Saturday while attending the final day of the G20 summit.

Trump's last meeting with Kim collapsed when the two sides could not agree on terms exchanging sanctions relief for relinquishing North Korea's nuclear arsenal. And the two sides have made little progress since.

After Trump's first summit with Kim, a year ago in Singapore, there appeared to be progress in thawing relations. North Korea released some imprisoned Americans and returned the remains of some soldiers who'd been killed in the Korean War.

For a period, North Korea also suspended its provocative missile tests. But in the past month they have resumed testing short range missiles, though have not yet conducted nuclear or intermediate- or long-range missile tests.

"I'm not sure what it is that President Trump is trying to accomplish, because while all this engagement has gone on, there has been no decline in the stockpile of North Korean nuclear weapons or missiles," said Joseph Yun, a former US special representative for North Korea under Trump and now a CNN analyst.

Trump says he's in no rush and claims to have already seen results -- both enough, in his view, for another meeting.

"If you're in a rush, you get yourself in trouble," he said during a news conference with South Korean President Moon Jae-in before his DMZ visit on Sunday.

Other presidents have gone to the DMZ -- without Kim

Sunday was not the first attempt Trump made to get to the DMZ, the heavily guarded stretch that has divided the Korean Peninsula for three-quarters of a century. He was foiled by weather last time around, in 2017. Always highly attuned to optics, Trump wasn't likely to pass up the opportunity to stare into the North from the observation platform.

Other presidents have made the same journey -- all peering into the North through binoculars -- but none have actually met the despotic leaders who rule it.

Nor has any sitting US president stepped across into the North.