For President Trump, it was the biggest live show yet: A handshake with North Korea’s Kim Jong Un, and then a short stroll together — beyond Freedom’s Frontier and into the Hermit Kingdom.

One small step for the 45th president; one giant boost for his television ratings.

Trump billed his third meeting with Kim on Sunday in the Korean demilitarized zone (DMZ) as a “simple handshake,” perhaps to play down the consequences if the get-together ultimately fails to break the deadlock that scuttled their last round of nuclear talks in Hanoi in February.

But the moment was more than simple — it marked another in a series of remarkable set pieces that Trump has used over the past two years — first to bully Kim, then to engage him — in a diplomatic gambit that has no precedent.

President Donald Trump met North Korean leader Kim Jong Un June 30 in the demilitarized zone between North and South Korea and briefly crossed into North Korea. (Reuters)

Critics often accuse the media-obsessed president of trying to conduct complex diplomacy on Twitter, the place where “Little Rocket Man” and “fire and fury” were born during the early days of Trump’s tenure when he and Kim were chest-beating in a barrage of threats and insults.

Yet, Trump has also carefully cultivated elaborately staged moments that, strung together, reveal a president eager to play the roles of producer and director, calling the camera shots, hyping the drama and building public expectations for a big reveal.

There was Trump’s surprising callout at the State of the Union in January 2018 to a North Korean defector, who raised his crutches in the air to an ovation in the House chamber as the president thundered about the Kim regime’s brutality.

North Korean defector Ji Seong-ho was recognized by President Trump during the State of the Union address on Jan. 30. (The Washington Post)

There was the time he popped into the White House briefing room unannounced and instructed reporters to go to the West Wing driveway for a “major statement” — which turned out to be South Korean officials announcing that Trump had agreed to hold a first summit with Kim.

And there was the night in July 2018 when Trump, along with first lady Melania Trump and Vice President Pence, visited Andrews Air Force Base under darkened skies to greet three Americans who had been released from captivity in North Korea.

In each case, the common element was that the drama played out on live television, and the president played the starring role.

“I want to thank Chairman Kim,” Trump told reporters after their meeting at the DMZ. “If he did not show up, I know the press would make me look really bad. So I appreciated it.”

Skeptics have accused Trump of elevating style over substance in his North Korea strategy, pointing out that a memorandum signed by the two leaders in Singapore last year contained no detailed road map and helped lead to the unsuccessful summit in Hanoi. U.S. intelligence agencies said the North continues to develop its nuclear program in secret, even though it has maintained a testing ban on nuclear weapons and ballistic missiles. Trump countered that each meeting is part of a larger process that eventually will yield results.

All presidents employ the elements of political theater to advance their governing agenda. The press pool of reporters that shadows the president, by definition, turns even his most mundane movements into a daily live journal, amplified in an era of social media and round-the-clock cable news.

Every president since Ronald Reagan, except George H.W. Bush, has visited the Korean DMZ, most of them donning a military bomber jacket and staring through oversized binoculars across the barren border.

But Trump has teased his visit into a “will he or won’t he go” story line that began 20 months ago during his first visit to Seoul. On that trip — coming at a time when Trump was threatening Kim with a “much bigger” nuclear button — White House aides signaled to reporters that he would not visit because such theatrics had become almost a “cliche” — never mind that presidents generally go to give a pep talk to U.S. and South Korean troops.

In fact, Trump attempted to make a surprise visit, only to be foiled when Marine One encountered bad weather and was forced to turn around. Still, Trump was able to create a dramatic moment later in the day when he delivered a speech to the Korean General Assembly, filled with gruesome imagery of North Korea’s brutality spoken in vivid language.

Ahead of Trump’s visit to South Korea on Sunday, White House officials again attempted to tamp down expectations, telling reporters on a background briefing in Washington on Tuesday that there was no meeting scheduled with Kim.

But Trump, ever the showman, tweeted early Saturday while in Osaka, Japan, for a global summit that he would visit the DMZ, and he extended an invitation to Kim to meet him for a handshake.

Some experts, noting how much security goes into arranging meetings between heads of state, especially with a regime as paranoid about safety threats as the Kim family, speculated that the meeting was planned well in advance.

But Trump, along with Kim and South Korean President Moon Jae-in, stated Sunday that everything fell into place after the president’s tweet. U.S. officials also said privately that they were caught by surprise.

Trump appeared to delight in keeping reporters guessing how events would unfold. He doled out blow-by-blow accounts of the negotiations over the handshake. “I understand they want to meet,” Trump said during remarks to business leaders in Seoul on Sunday morning.

“Chairman Kim wants to do it; I’d like to do it,” Trump said later at a bilateral meeting with Moon at the Blue House.

During a joint news conference in the early afternoon, Trump declared: “We are going to the DMZ, and I’ll be meeting with Chairman Kim.”

At the DMZ, reporters gathered to cover Trump’s arrival. CNN went to live coverage with a view of the barren military installation and anchor Jim Sciutto tweeted a video of Marine One passing overhead.

Camera shots at times went fuzzy. At one point, color bars flashed on-screen, suggesting the satellite feed was lost. Then it went back on. Online streams showed footage of White House aides and security officials jostling with reporters. At times, a viewer could see Trump’s advisers in the frame — Treasury Secretary Steven Mnuchin, daughter Ivanka Trump, son-in-law Jared Kushner — like familiar background actors in a recurring series.

Then came Trump, striding toward the dividing line between North and South Korea in Panmunjom village, where blue negotiating rooms straddle the 38th parallel. As he passed the cameras, his back now filling the frame, one could see Kim, tiny at first, then coming into clearer view, approach from the other side.

They shook hands, and then Trump stepped over the line into the North — the first sitting president to do so. North Korea’s state media reporters rushed to capture the moment as Trump and Kim strolled about 10 yards to the steps leading to a building usually guarded by soldiers.

Then they turned and walked back toward the American and South Korean reporters on the other side. Soon, they were surrounded in a scrum and the president was addressing the cameras, flanked by one of the world’s most brutal dictators.

“I think it’s historic,” Trump said. “It’s a great day for the world.”

But the president wasn’t done yet. Speaking to reporters again after Kim had departed, Trump confirmed he had invited the North Korean dictator to visit the United States.

“At some point,” the president promised, “it will all happen.”