Much to smile about Kevin Lim / The Straits Times / Reuters

Kim Jong Un is probably feeling pretty good right now. A year ago, the North Korean leader was trading threats with President Trump; on Tuesday, he was shaking hands with him in Singapore. And in what must count as the swiftest political rehabilitation since the Soviets freed political prisoners after Khrushchev denounced Stalin, Trump called Kim “a very talented man” who “loves his country very much.”

What Trump received in exchange for those kind words was an assurance of denuclearization—but with no timeline for when that will happen or whether the process will be open to international inspectors. What Kim got was a lot more: Trump promised to suspend the joint U.S. military exercises with South Korea, which Trump, echoing North Korea’s longstanding view, labeled “very provocative”; Trump appears not to have insisted at this stage on what denuclearization will look like; and, perhaps most importantly, Kim got something neither his father nor his grandfather, who ruled North Korea before him, received: a one-on-one meeting with the president of the United States (accompanied only by translators).

And with that meeting, Kim has gone from an international pariah, a brutal dictator who rules over what is essentially a personal fiefdom, to something closer to a legitimate member of the international community. Among other things, Kim got this video, tweeted by the president, that the North Korean leader can air, unedited, on his highly censored television stations:

It’s not an outcome anyone would have predicted last fall. North Korea tested missile after missile, including some thought capable of reaching the contiguous United States, and in between also tested a nuclear device. Trump threatened “fire and fury” and traded personal insults and military threats with Kim. While the two leaders boasted about the size of their “nuclear buttons,” U.S. lawmakers played up the possibility of a preemptive nuclear strike; the Trump administration simply said all options were on the table—reiterating a longstanding U.S. policy. In January, Kim announced North Korea’s nuclear deterrent against the United States was complete, and “no force and nothing can reverse” it.

The heated rhetoric, which Trump said Tuesday “he hated to do,” came against the backdrop of the death of Otto Warmbier, the 22-year-old University of Virginia student who spent more than a year in a North Korean prison for allegedly stealing a propaganda sign from his hotel. At the time, Trump condemned “the brutality of the North Korean regime,” adding: “Otto’s fate deepens my administration’s determination to prevent such tragedies from befalling innocent people at the hands of regimes that do not respect the rule of law or basic human decency.” At the summit, though, the president did not publicly raise the issue of North Korea’s abysmal human-rights record. Kim has ordered the executions of hundreds of people—among them a general who fell asleep while Kim was talking—and the country is said to have up to 130,000 political prisoners in its camps. When asked about this by Voice of America’s Greta Van Susteren, Trump replied, “Look, he’s doing what he’s seen done, if you look at it. But, I really have to go by today and by yesterday and by a couple of weeks ago because that’s really when this whole thing started.”

But when Kim offered an opening in January, Moon Jae In, the South Korean leader, accepted it immediately, beginning a process of reconciliation that culminated in Tuesday’s meeting in Singapore with Trump. North Korea’s charm offensive began with Kim Yo Jong, the dictator’s sister, at the Winter Olympics in South Korea. She won rave reviews for simply turning up, smiling, and shaking hands with Moon. Amid the subsequent talks with South Korean and U.S. officials, the North even freed three U.S. citizens who had been detained for various reasons, earning the regime positive reviews from the Trump administration.

Those sentiments are likely to be repeated. In the apparent absence of any expectations, Kim, who is 34 years old, cavorted around Singapore with the city-state’s foreign minister and other officials, took selfies, and visited Sheldon Adelson’s casino. Until recently, Kim had not publicly left his country since becoming supreme leader in December 2011, and little was known about him. But in March, he visited China, his country’s main political backer, for the first time, returned there in May, received Mike Pompeo, first as CIA director and then as U.S. secretary of state, and now, to cap it all off, has met with Trump. Not bad for the leader of a regime of a country that has been starved by both stringent international sanctions and the Kim family’s criminal activities. North Korea desperately needs investment to bolster its economy—though its ability to create geopolitical instability is matched in quality only by its ability to evade international sanctions. But while Kim’s treatment of his country might create the image of a brutal dictator, what Trump apparently saw was a man whose “country does love him. His people, you see the fervor. They have a great fervor,” the president said.

The two countries will now engage in intense diplomacy to hammer out the details of what an agreement will look like. The North Koreans have plenty of experience in this—given that they undertook similar negotiations with both the Bush and Obama administrations. Those discussions—and the agreements they spawned—ultimately ended in failure. Trump said Tuesday he trusted Kim to hold up his end of the agreement. But he added: “I may be wrong, I mean I may stand before you in six months and say, ‘Hey I was wrong.’ I don’t know that I’ll ever admit that, but I’ll find some kind of an excuse.”

Kim doesn’t need an excuse. He returns home to North Korea more in charge of his country than ever before. The world’s cameras and TV screens showed him shaking hands with the American president. Even if Trump’s earnest effort at ending the conflict on the Korean peninsula fails, Kim can walk away happy.