Little was known of Kim Jong Un when he assumed North Korea’s leadership in December 2011. Reporting on his ascent following the death of his father, Kim Jong Il, The New York Times noted: “Mr. Kim is young—believed to be in his 20s—and untested, making him more vulnerable to challenges.”

In the intervening seven years, Kim all but closed himself off to the outside world, cemented his hold on power, and advanced an already advanced nuclear-weapons program. During this time, he has also evaded international sanctions, opposition to his nuclear ambitions from his regime’s most important friends in Beijing, and withstood first the Obama-era policy of “strategic patience” and then the Trump administration’s “maximum pressure and engagement” approach.

It was, said Jung Pak, who studied Kim as a U.S. intelligence analyst, the North Korean leader’s version of “maximum pressure.”

“He did not engage diplomatically at all in those first seven years, probably because he didn’t want to hear the Chinese nagging him about advancing these weapons,” Pak, who is now a senior fellow at the Brookings Institution, told me. “And also he wasn’t going to start bargaining or negotiating them away.”

Apparently until Friday. That was when Kim and his South Korean counterpart, Moon Jae In, met for a historic summit and announced they would work toward a nuclear weapons–free Korean peninsula and a formal peace treaty to officially end the 1950–53 Korean War, which ended in an armistice. Next up: a possible summit meeting with President Trump; ahead of which, on Sunday, a South Korean government spokesman said Kim had offered to give up his nuclear weapons in exchange for U.S. security guarantees.

“Kim has done a pivot where he’s doing a maximum engagement,” Pak said.

Although Moon’s overtures to North Korea and Trump’s pressure campaign have been credited with Kim’s apparently new willingness to talk to the world, it’s also true that the North Korean leader finds himself in a comfortable position. For one, his regime claims North Korea is now a nuclear power, and has written that status into the country’s constitution. Second, though, the statement Kim himself signed onto Friday jointly with the South repeats Kim’s earlier calls for a “nuclear-free Korean peninsula,” which is a significantly more complicated concept than simply the North giving up its nuclear weapons—it also implies limitations on U.S. nuclear-capable forces in South Korea. (The South does not currently have such weapons, but the U.S. has in the past kept tactical nuclear weapons there as a deterrent.) Kim’s reported comments on Sunday, in which he was quoted as asking for “nonaggression” in exchange for denuclearization, leaves similar room for demands the U.S. may find unacceptable, such as abandoning its alliance with South Korea.  

Then there is the situation within North Korea itself—as well as its relationship with its neighbors. The country’s human-rights record remains wretched and has not noticeably improved since the younger Kim took power. Kim has cemented his authority by surrounding himself with his loyalists and ordering his rivals killed or assassinated—sometimes, reportedly, by exceptionally gruesome means including with a nerve agent and with an anti-aircraft gun. North Korea continues to evade international sanctions.

Kim says North Korea has developed an intercontinental ballistic missile that could be fitted with a nuclear warhead capable of reaching the contiguous United States. He continues to carry out cyberattacks around the world, possesses chemical and biological weapons, and has vowed to mass produce weapons of mass destruction. Until recently he regularly threatened South Korea, Japan, and the United States while pointedly ignoring China, whose protection has helped ensure his regime’s survival. For all these actions, his country has been subject to increasingly harsh international sanctions.

But he is now getting rewarded, in PR terms if not yet in terms of sanctions, for signaling a willingness to talk. “I think probably that the lesson that he’s learning is that he doesn’t have to give up anything and yet people will be scrambling for summits with him,” Pak said.

As part of his approach, Kim successfully identified fissures between Trump, who has favored a tough approach on North Korea, and Moon, who was elected on a pledge of closer relations with Pyongyang. Additionally, he’s dealing with two relatively new presidents: Trump, who has either three or seven years in office left, and Moon, who has four more years in office.

“The longer we have these drawn-out talks, these summits, bilaterals, trilaterals, quadrilaterals, the more it buys time for them to reinforce their claimed status [as a nuclear power] but also to continue with their R&D,” Pak said. “But I do think that there is an element of trying to mitigate the sanctions, and also Kim took all those discussions about military strikes seriously enough to try and take the wind out of the sails.”

This, she said, shows Kim is adept at dealing with regional and world leaders, telling them want they want to hear. He’s cited the common heritage of all Koreans when dealing with Seoul. And with Beijing, she says, Kim has cited all the things North Korea can learn from China in science and technology.   

“He knows his audience, it seems, and he’s been using and calibrating his charm offensive based on who the audience is,” she said. “But North Korea has not said anything different from what we’ve heard in the past.”

Indeed, Bruce Klingner, a former U.S. intelligence official who worked on Korean issues, said on Twitter that the statement issued Friday by the two Koreas was similar to joint communiqués, agreements, and statements signed in 1972, 1992, 2000, and 2007. “Much of today's language seems lifted from previous agreements,” Klingner, who is now a senior research fellow at the Heritage Foundation, said.

Or, as Pak put it: “I find it difficult to envision how or why he would give up his nuclear weapons, which have pretty much given him what he’s wanted: which is the strategic relevance, the international prestige, and deterrence.”