SINGAPORE— Kim Jong Un is, according to totalitarian North Korea’s state media, an internationally respected statesman who is widely recognized as having transformed North Korea into “a top country in the world.” A man who is revered not only for his genius and vision but also for his kindness.

Don’t just take the propagandists’ word for it. The most powerful man in the world thinks so too.

Kim Jong Un is not just “very talented” but is a “very smart negotiator” who “loves his country very much,” President Trump said after spending about five hours with Kim during Tuesday’s summit. As proof of the young leader’s prodigious ability, Trump noted that Kim had been able to run North Korea from the age of 26, “and run it tough,” in a way that few people could.

This lavish praise from Trump – coupled with photos of people lining the streets of Singapore to catch a glimpse of Kim, as they are compelled to do in North Korea –- have reinforced the myth of Kim’s greatness in ways that even his spinmeisters cannot.

“In North Korea, he was already the greatest leader, but now he can substantiate that because even Trump said he was one in ten thousand,” said Georgy Toloraya, a former Russian diplomat in Pyongyang who is now director of Korean programs at the Russian Academy of Science.

“With this, I think Kim Jong Un has proven his right to claim to be one of the world’s top leaders, especially after the way Trump handled (Justin) Trudeau and other Western leaders. Kim Jong Un has emerged from this as a respected international statesman,” said Toloraya, who knew Kim Jong Un’s father, Kim Jong Il, well.

The Kim family has managed to defy the tides of democracy and liberalism to remain in control of North Korea for seven decades. It has done this by almost entirely cutting off the country from the outside world and telling the hungry, impoverished populace that they live in a “socialist paradise.”

While the current leader’s grandfather and father propagated the myth over decades that they were divinely ordained to rule, Kim Jong Un enjoyed no such advance marketing. Instead, only two years before his father died, he had to stake a claim to be the legitimate, third-generation leader of the world’s only communist dynasty.

He has done that through heavy propaganda and even heavier repression, sending those who question his fitness to rule to do hard labor in mountain gulags, often with their entire families.

After spending the first six years of his reign aggressively accelerating the nuclear weapons program, Kim now appears to be turning to economic development as a way to sustain his leadership.

“I think he is pretty serious about this because he knows that his father and grandfather failed to advance the economy,” said Hoo Chiew-Ping, a North Korea specialist at the National University of Malaysia.

North Korea has a per capita income of about $1,700 a year, according to the CIA’s World Factbook, lower than Afghanistan and Haiti. The elite around Kim have enjoyed sharp increases in their standards of living as a market economy has flourished, but this has not been shared by the general populace.

For that reason, Kim wants development and the outward signs of growing prosperity, akin to what North Koreans see across the river in China.

“He wants special economic zones and ski resorts and new airports. He wants more megaprojects,” Hoo said.

Trump, the real estate magnate, appealed to Kim’s ambitions to help turn Pyongyang into a modern city like the one the North Korean leader toured on Monday night, a city with high rises and traffic and electricity.

He presented Kim with a promotional video showing digital renderings of huge construction projects in North Korea and suggested that the country’s beaches would be great places to build condos instead of firing missiles. “I said, ‘You know, instead of doing that, you could have the best hotels in the world right there,’ ” Trump said. “Think of it from a real estate perspective.”

But Kim didn’t just get legitimacy and the prospect of economic development from Tuesday’s summit.

He got “security guarantees” from the United States, a much stronger commitment than the “assurances” of the 1994 Agreed Framework deal. He also got Trump to agree to work toward the “complete denuclearization of the Korean Peninsula” – not just North Korea but the South too – without any specific mention of North Korea’s nuclear weapons or the verifiable and irreversible dismantlement of them.

Kim has conceded no more than he did during his April summit with South Korean President Moon Jae-in, said Alison Evans, a North Korean specialist at IHS Markit, a risk consultancy.

“Rather, the statement implicitly recognizes North Korea as a de facto nuclear weapons state,” she said. “This lends North Korea, and specifically Kim, legitimacy at home and abroad.”

Kim also got an end to the annual military exercises between the American and South Korean militaries, drills that his regime views as a rehearsal for an invasion.

“And North Korea promised nothing but a good attitude,” Toloraya said.

Even without having to lay out a timetable or a pathway to scaling back his nuclear weapons program, let alone giving it up, Kim is already starting to reap the rewards.

China’s foreign ministry on Tuesday suggested that sanctions could now be “adjusted accordingly, including suspending or lifting relevant measures.”

Malaysia’s new prime minister, Mahathir Mohamad, on Tuesday said that his country will reopen its embassy in Pyongyang. It was closed last year following the assassination of Kim’s half brother, Kim Jong Nam, with a chemical weapon at Kuala Lumpur’s airport.

Mahathir, who won a surprise victory in elections last month, played down that assassination, widely thought to have been ordered by the North Korean leader.

“I must say killing people is sometimes practiced by other countries also. Not only North Korea,” Mahathir said at a forum in Tokyo this week. “These things are bound to happen, but to condemn a country because this happened would mean that we will be unfriendly with most countries in the world.”

Far more important, he said, was “the new attitude of North Korea.”

When Kim lands back in Pyongyang on Wednesday morning, the state media will be able to present his trip as an unqualified success – and this time, analysts say, they won’t have to exaggerate much.

“Kim Jong Un wants to present himself as the enlightened monarch of an aristocratic state like Brunei,” Toloraya said. “Or like Singapore in an earlier era.”