— President Trump met Kim Jong Un at the demilitarized zone between North and South Korea on Sunday and crossed briefly into North Korea, becoming the first sitting U.S. president to visit the isolated state.

The two men held 53 minutes of private talks and agreed to set up teams to “work out some details” to determine whether progress could be made in their negotiations over North Korea’s nuclear program, Trump said.

“Speed is not the object. We want to see if we can do a really comprehensive, good deal,” Trump said after the talks. “Nobody knows how things turn out, but certainly this was a great day. This was a very legendary, very historic day.”

“It’ll be even more historic if something comes up, something very important,” he added. “Very big stuff, pretty complicated, but not as complicated as people think.”

The meeting came four months after the second summit between the two leaders broke down in Hanoi. Trump has argued that the summit was a success because his relationship with the North Korean leader deepened.

History was made at 3:45 p.m. local time on Sunday as Trump and Kim walked up to the line dividing the two Koreas and shook hands. Kim then invited Trump to cross into North Korea. The two men strolled a few yards to a road on the North Korean side, stayed a few seconds, then crossed back.

“Good to see you,” said Kim, dressed in a black Mao suit. “I never expected to see you in this place.”

Kim said the very fact of the meeting was significant.

“We want to bring an end to our unpleasant past and bring in a new future, so this is a very courageous and determined act,” he said. “This handshake of peace itself serves to demonstrate that today is different from yesterday.”

Trump said it was “my honor” to cross into North Korea.

“A lot of really great things are happening, tremendous things,” he said. “We met and we liked each other from Day One, and that was very important.”

The two men then met with South Korean President Moon Jae-in before adjourning for bilateral talks in the Inter-Korean House of Freedom on the southern side of the border.

Sitting down before the talks began, Kim again underlined the importance of the meeting.

“I hope it can be the foundation for better things that people will not be expecting,” he said. “Our great relationship will provide the magical power with which to overcome hardships and obstacles in the tasks that need to be done from now on.”

Earlier, Trump also spoke warmly of Kim.

“We’ve developed a very good relationship, and we understand each other very well. I do believe he understands me, and I think I maybe understand him, and sometimes that can lead to very good things.”

Trump said the sides would designate teams to start work in the next two to three weeks.

“They’ll start a process, and we’ll see what happens,” he said.

The U.S. team is to be headed by special envoy Stephen Biegun, working under Secretary of State Mike Pompeo.

Unconfirmed media reports have suggested that Pompeo and Biegun’s North Korean counterparts were both disciplined or demoted after the Hanoi summit in February. Trump said Kim would put someone in charge “who we know and we like.”

Moon also spoke of the meeting as a historic moment.

“Through today’s meeting, the peace process for complete denuclearization of the Korean Peninsula and establishment of permanent peace has overcome a big hurdle,” he said. “It gave a big hope to the world and the 80 million people of South and North Korea.”

 Trump broadcast his offer to meet Kim at the border in a tweet Saturday from the Group of 20 summit in Osaka, Japan. A senior North Korean official responded that the offer was “interesting.”

Whether the meeting was really arranged in just 24 hours remains open to question — the two men exchanged letters earlier this month — but Trump said the idea had simply occurred to him on Saturday.

“Yesterday, I was just thinking, ‘I am here, let’s see whether we can say hello to Kim Jong Un,’ ” he said. “I put the word out and he got back and wanted to do it from the beginning and so did I.”

Trump later said the two sides had “moved mountains” to organize the meeting at such short notice.

Andrei Lankov, a professor at Kookmin University in Seoul, said it was inconceivable that the leaders of two powerful nations had arranged a meeting at such short notice. He described it as a “show” designed to send a political message without raising expectations about actual progress.

“They needed something that is strong on optics but weak on substance,” he said. “Substance is difficult or impossible to achieve in the available time frame, and involves such painful issues that they would like to keep pushing the can down the road.”

Trump, under fire for inflaming tensions with Iran, wanted to portray himself as a diplomat who prevented war with North Korea, Lankov said. Moon wanted to shore up his domestic support and prevent the peninsula from sliding back into hostility. Kim wanted to counter domestic criticism that his engagement with the United States had failed to yield results.

Moon greeted Kim at the border after Trump, but did not join the two men for their private talks. North Korea’s Foreign Ministry said last week that it did not want Seoul mediating, and told South Korean authorities to “mind their own business at home.”

In remarks to reporters throughout the day Sunday, Trump said repeatedly that he had calmed tensions on the Korean Peninsula, and argued that the region would have been engulfed in war if he had not been elected president.

“We are in a much different place than we were two and a half years ago,” he said. He said it was “insulting” that the news media could say otherwise.

Trump said the DMZ had been “very dangerous,” but was now much less so since his first summit with Kim in Singapore last June.

“I say that for the press,” he said. “They have no appreciation for what is being done. None.”

Trump earlier pointed to the fact that North Korea had ceased nuclear tests. He also claimed North Korea had ceased ballistic missile tests and was continuing to send back the remains of U.S. servicemen killed in the Korean War.

In fact, North Korea has tested short-range ballistic missiles since the Hanoi summit. The Pentagon says contacts with Pyongyang over the return of remains have ceased.

Critics say Trump actually inflamed tensions dangerously in the first months of his presidency. Now, some warn, he has gone so far the other way that he is rapidly legitimizing North Korea as a nuclear weapons state and letting Kim off the hook for massive human rights violations in one of the most repressive regimes on the planet. 

“At the beginning, there was a lot of anger between myself and Kim Jong Un,” Trump said. “Something happened. There was a point at which it happened, and all of a sudden you get along.”

Lankov said Trump no longer highlights North Korean denuclearization as frequently as in the past — indicating that he now understands the goal is unrealistic. 

“He began to realize his only chance is not solving the problem but managing the problem,” he said. “He began to move the goal posts.”

As journalists attempted to gain access to the previously unannounced sit-down between Trump and Kim. new White House press secretary Stephanie Grisham was bruised in a scuffle between North Korean security and members of the U.S. press pool, the Associated Press reported. The Secret Service intervened as North Korean guards pushed and shoved American reporters to block them from entering the Inter-Korean House of Freedom, according to the AP. The incident was partially captured on video.

While Trump met with Kim, his daughter and son-in-law, Ivanka Trump and Jared Kushner, also crossed briefly into North Korea.

Ivanka Trump called the visit “surreal.”

Denyer reported from Seoul. Min Joo Kim in Seoul contributed to this report.