SEOUL – In a made-for-television event of more symbolism than substance, President Donald Trump met Sunday with Kim Jong Un in the Demilitarized Zone between North and South Korea and became the first U.S. president to step onto North Korean territory.

"Stepping across that line was a great honor," Trump told Kim after walking with him on the North Korean side of the border. He said "a lot of progress has been made" in the wake of their two summits in Singapore and Vietnam.

After meeting with Kim for nearly an hour, Trump said both sides will set up "teams" to revive negotiations to dismantle North Korea's nuclear weapons programs, a goal that has been elusive for years.

Trump called it a "legendary" day that could lead to progress.

Kim told Trump, "I did not expect to see you at this place" before reminding him he would be the first U.S. president to cross into North Korea. Kim clapped when Trump stepped onto North Korean territory.

Later, while being questioned by American reporters, Kim lauded Trump for a "determined and courageous visit" designed to "bring an end to the unpleasant past."

Though Trump had said the meeting would be little more than a quick handshake, he and Kim wound up speaking for close to an hour in a nearby building. They reemerged for another stroll along the border, followed by armies of camera-wielding journalists and security personnel.

Photographers, reporters and security guards jostled for position and yelled at one another to get out of the way. Kim chuckled over the pandemonium. Trump grinned frequently during his chats with the North Korean leader.

"We met, and we liked each other from Day One," Trump had said of Kim.

Members of Trump's entourage were in the room for his meeting with Kim, including senior advisers and family members, such as the president's daughter Ivanka and her husband, Jared Kushner. They went into a building that allowed them to cross the border into North Korea, an experience Ivanka Trump described as "surreal."

While applauding Trump's goals, foreign policy analysts said the border meeting and the theatrics won't mean much unless he and Kim make progress on a deal to dismantle North Korea's nuclear weapons programs.

Trump tends to "equate how he feels about a foreign leader and how he is treated with diplomacy," tweeted Richard Haass, president of the Council on Foreign Relations. "They are not the same. What matters is what is agreed to and actually happens. It is not the personal but policy that counts."

After the meeting, Trump said he would invite Kim to visit the USA "at the right time" if things work out.

Earlier Sunday, during a news conference in Seoul with South Korean President Moon Jae-in, when Trump announced he would meet with Kim, Moon praised the idea as a "handshake for peace."

The DMZ includes the border between North and South Korea, and no U.S. president had ever stepped over that line until Sunday. Trump said he would have "no problem" becoming the first.

Before the brief chat with Kim, Trump received a traditional tour of the DMZ and was shown how American and Korean forces guard the heavily fortified region.

Trump said "we're doing well" with North Korea, and tensions have been greatly reduced since he started meeting with Kim.

The two leaders held summits in Singapore and Vietnam but were unable to strike a deal in which North Korea junks its nuclear weapons facilities in exchange for reductions of economic sanctions.

After the meeting with Kim, Trump headed to nearby Osan Air Base and spoke with U.S. troops. He then boarded Air Force One to return to the USA.

Trump arrived in Seoul after attending the G-20 summit in Osaka, Japan, where he and Chinese President Xi Jinping agreed to restart talks on a trade agreement that could end the economically damaging trade war between the world's two largest economies.

The last time Trump and Kim met, they broke off negotiations after a second summit in Hanoi, Vietnam.

More:Trump's own brand of diplomacy is on display at G-20. How will it fare with Valdimir Putin, Xi Jinping?

More:Donald Trump, Kim Jong Un fail to strike deal, call off nuclear weapons talks early

Kim said North Korea would not submit a specific plan to dismantle nuclear weapon sites until the United States removed economic sanctions; Trump said the United States wouldn't remove sanctions until North Korea put up a denuclearization plan.

Early in his term, Trump mocked Kim as "Little Rocket Man" and threatened to rain "fire and fury" on North Korea if it ever made a move to use nuclear weapons.

As the North Koreans made overtures for settlement talks, Trump changed his tune toward Kim. Trump now casts Kim as someone with whom he can make a deal.

Trump criticized predecessor Barack Obama for his approach to North Korea, as well as news coverage of his dealings with Kim. Trump claimed his policy has avoided war with North Korea.

Some foreign policy analysts saw the latest Trump-Kim get-together as a prelude to a third summit.

Harry Kazianis, senior director of Korean Studies with the Center for the National Interest, said the two leaders can't afford to renew the kind of threats they made little more than two years ago.

"There will be a reset in relations, and that is a win for both leaders," Kazianis said. "Both men have too much to lose now if they were to go back to the dark days of 'fire and fury.' A deal will take time to come together, but it will come together."

Olivia Enos, a policy analyst with the Asian Studies Center at the Heritage Foundation, said the impromptu Trump-Kim meeting would do little to advance denuclearization.

That requires "sustained working-level negotiations" among experienced negotiators, she said, not "another photo-op" with a "rights-abusing, illegal nuclear weapons-possessing North Korean dictator."

Trump had planned to visit the Demilitarized Zone during a trip to South Korea in 2017, but bad weather forced him to cancel.

Visiting the DMZ, one of the world's most heavily guarded areas, has become almost a rite of passage for American leaders. Every U.S. president since Ronald Reagan has toured the area except for George H.W. Bush, and he went when he was vice president.

Trump said previous presidents had sought meetings with Kim but couldn't get one. Previous presidents actually refused to grant Kim a meeting because of the regime's behavior and North Korea's refusal to make any sort of commitment to forgo nuclear weapons.

"Trump is lying," tweeted Ben Rhodes, a foreign policy aide during Obama's eight years in office. "Obama never sought a meeting with Kim Jong Un. Foreign policy isn’t reality television it’s reality."

Rhodes said, "Photo ops don’t get rid of nuclear weapons, carefully negotiated agreements do."

Michael McFaul, a U.S. ambassador to Russia during the Obama administration, tweeted that if the Trump-Kim handshake "eventually leads to complete and verifiable North Korean denuclearization, today will (be) remembered as a historic day."

He added, "And if it doesn’t, it will be remembered as a photo op stunt. High stakes."