Credit President Trump for seizing the diplomatic moment at the Singapore summit. But the person who most shaped this extraordinary encounter was North Korean leader Kim Jong-un -- who is indeed, as Trump said Tuesday, a “very talented” young man who has achieved something that “1 out of 10,000 probably couldn’t do.”

It’s almost a magic trick, what Kim has accomplished: He has obtained Trump as a partner in rebranding his poor, brutally autocratic country as a modern condo-resort investment project. He has offered a vague promise to “work toward complete denuclearization” and somehow convinced Trump to describe the thin, half-page summit communique as a “very comprehensive” agreement.

Perhaps this deal will lead eventually to the “complete, verifiable and irreversible denuclearization” that Trump had proclaimed was his goal. But for now, Kim has given up very little militarily, in return for a public embrace from the world’s most powerful nation. Most importantly, Kim has obtained, again at minimal cost, a pledge that America will halt military exercises with South Korea, undercutting the most significant check against his regime.

Trump celebrated his skill as a deal-maker after Tuesday’s summit: “That’s what I do. My whole life has been deals, I’ve done great at it.” But more striking was this latest demonstration of his calling as a reality TV star, with a born actor’s flair for the dramatic and a self-mesmerizing ability to speak every line, however dubious, as if it were true.

Maybe this is “The Apprentice: Korean Dictator Edition,” in which Trump is the mentor for an up-and-coming “big guy.” Watching the clasped elbows and back pats, you could almost forget that Kim had killed an uncle and half brother on the way to Singapore. Trump explained his respect for “anybody that takes over a situation like he did at 26 years of age and is able to run it and run it tough.” Kim, you’re hired!

I don’t mean to minimize the summit’s potential benefit for the world. The world is safer than it was a week ago, and Trump is getting some deserved global applause.

But we should see the Singapore meeting for what it is: Kim set this ball rolling five years ago, with a little noticed call for “denuclearization of the Korean Peninsula” and “high-level talks” with the US. Since then, Kim has deftly maneuvered the twists and turns -- defying a threat of “fire and fury” obliteration from Trump last year to complete development of a nuclear-tipped missile that could threaten America. Once Kim had obtained this capability in November, he began to pivot toward negotiations.

It was a breathtaking piece of mutual audacity for Kim and Trump to push each other to the edge of the cliff and then walk back. But by Tuesday, it was clear that Kim was getting more than he was giving, and that Trump wanted the summit so badly that he was prepared to swallow some of his earlier demands. This seems like the sort of deal -- opening the door for Pyongyang in exchange for unanchored promises -- that national security adviser John Bolton has been warning about for 25 years.

I think Trump is right in betting that American-led modernization and economic growth will, over time, bring political changes that can diminish a potential nuclear threat to America and its allies. But I wonder: Does it occur to Trump that this is precisely the bet that President Barack Obama made with the Iran nuclear agreement, aka (in Trump-speak) “the worst deal ever made”? The main difference is that Obama got a real, verifiable commitment to destroy Iran’s nuclear stockpile before making any major American concessions.

A final, astonishing aspect of Tuesday’s summit was Trump’s gratuitous swipe at South Korea, a faithful democratic ally. I don’t just mean Trump’s sudden decision to shelve “provocative” US-South Korean military exercises; America still has plenty of military power nearby, if needed. And let’s even accept Trump’s insistence that “at some point” America should remove its roughly 30,000 troops -- even though their presence reassures South Korea, Japan and even China.

No, the truly amazing Trump insult was to suggest that President Moon Jae-in made his bold opening to Kim to reduce a threat to the PyeongChang Olympics and thereby make money. “They weren’t exactly selling tickets,” Trump said at Tuesday’s press conference. “It sold like wildfire” after North Korea agreed to participate, said Trump, ever the crass merchandiser.

Diplomacy isn’t always pretty. Dubious people sometimes do very good things. So let’s celebrate Trump’s success in Singapore, and hope that someone can translate President Reagan’s injunction to “trust but verify” into Korean.

David IgnatiusDavid Ignatius can be reached via Twitter: @IgnatiusPost. --Ed.