North Korean leader Kim Jong Un and President Trump shake hands at the conclusion of their meetings at the Capella resort on Sentosa Island in Singapore in June 2018. (Susan Walsh/AP)

John Brennan served as director of the Central Intelligence Agency from March 2013 to January 2017.

When Kim Jong Un became North Korea’s leader in December 2011, most Western intelligence agencies were uncertain whether the not-yet-27-year-old would be able to consolidate political power and secure the dynastic rule that his father and grandfather had maintained since the country’s official founding in 1948. With limited government experience and negligible involvement in foreign affairs, the young Kim catapulted to power overnight and assumed responsibility for navigating the many domestic, regional and international shoals ahead of him. One of the most challenging was bringing to fruition Pyongyang’s decades-long march to develop and deploy a nuclear weapons capability.

After seven years in power, Kim has put to rest any doubt about his ability to rule North Korea with an iron hand. He has developed his own cult of personality, instilling both abject fear and strong fealty among impoverished North Korean masses and within North Korea’s military and security establishment. After ruthlessly eliminating real and perceived pretenders to the throne, as well as senior officials with suspect loyalty, Kim is now fully in command and exercises as much political power as his predecessors, if not more. Moreover, he evinces a confidence and sophistication well beyond his 35 years, which has further strengthened his domestic position.

His real mastery, however, has been his adroit handling and manipulation of the international stage upon which he struts and others fret. Like his grandfather, Kim Il Sung, and his father, Kim Jong Il, the young Kim assumed his leadership perch consumed with the need to deter a U.S.-led effort, military or otherwise, to unify the Korean Peninsula under South Korean domination. With sizable and increasingly capable U.S. and South Korean forces only a short hop across the tense border — the result of an armistice-suspended war that killed more than 1 million North Koreans — the quest to acquire a nuclear deterrent became more ingrained in the DNA of each successive Kim.

In the last two years of the Obama administration, Kim appeared bent on increasing the pace of his nuclear and ballistic missile programs. Despite international isolation, stiff economic sanctions and increased pressure from China, Kim was determined to achieve the technical capability to launch a nuclear warhead atop a ballistic missile that could reach the United States. With it, he believed he could deter any U.S. effort to topple his regime and reunify the Korean Peninsula.

The change of U.S. administrations in January 2017 provided Kim the opportunity to complement this rather aggressive program with a political strategy to curry favor with the new and inexperienced U.S. president. His objective was clear: gain tacit U.S. and international acceptance of North Korea’s nuclear status — much like the de facto international acceptance of nuclear weapons programs in Israel, India and Pakistan. If successful, North Korea would be able to keep its deterrent nuclear stockpile and delivery systems, while at the same time ending its international pariah status, which could bring much-needed economic assistance and opportunities.

Kim’s strategy in 2017 was “escalate to deescalate.” He ratcheted up the pace and technical capabilities of his strategic programs, conducting North Korea’s sixth nuclear test, with a reported yield five to 15 times the size of Hiroshima’s atomic bomb, and a missile test that technically put much of the continental United States in Pyongyang’s crosshairs. Rhetorical saber-rattling accompanied the missile and nuclear tests, and President Trump took the bait, with both sides trading insults — ”dotard,” “rocket man,” “sick puppy” — and threats that made the specter of military confrontation, and even a nuclear exchange, more real.

Then, much like the American basketball players he admires, Kim sharply pivoted, shedding his outwardly reckless and confrontational behavior in favor of a polished patina of accommodation and international responsibility. He was a model of good behavior during the Winter Olympics in South Korea, even agreeing to field a joint women’s hockey team with his Peninsula rivals. Kim released the tortured and mortally injured U.S. citizen Otto Warmbier and the remains of U.S. servicemen killed during the Korean War. He also made ear-pleasing yet vague public references about his willingness to engage in denuclearization talks.

For these superficial gestures, Kim was granted a high-profile summit in Singapore with the president of the United States — Kim’s long-sought goal of achieving public relations parity with the world’s most powerful nation and South Korea’s ultimate security guarantor. Prone to flattery and not recognizing Kim’s agile feint, Trump once again swallowed the bait — hook, line and sinker. By his own admission, Trump “fell in love” with the crafty Kim, canceling U.S. military exercises in the region and ruminating about a reduction of U.S. forces in South Korea. Invective from both sides ceased, and international censure and pressure on Pyongyang lessened. Most significantly, money, people, fuel and black-market commerce reportedly began to flow once again across the North Korea-China border, a show of appreciation by Beijing for Kim’s statesmanlike performance.

As a second summit between Trump and Kim nears, it is indeed a very good thing that the heightened tension between the United States and North Korea, initiated by Kim and abetted by Trump barely a year ago, has subsided. During such times of strategic antagonism, an inadvertent military skirmish along the land border between North and South Korea or on their coastal seas could quickly spiral out of control, with potentially devastating consequences. And an ongoing, albeit seemingly unproductive, diplomatic dialogue between Washington and Pyongyang also is a positive development, as talking with one’s adversaries is always better than not.

Nevertheless, Kim won the last round with the United States, and he is poised to continue his successful game of four-corner stall. He maintains firm control over his stockpile of nuclear warheads and ballistic missiles, as well as the facilities that produce their feed materials and delivery systems. North Korea’s major nuclear scientific research center at Yongbyon has expanded, according to mid-2018 satellite imagery, and Kim has refused to grant outside access to any of his well-scattered nuclear- and ballistic missile-related facilities. And with a half-dozen nuclear and several dozen ballistic missile tests under its belt, Pyongyang likely has the technical confidence it requires for a viable nuclear deterrent, thus reducing the need for additional controversial tests, at least in the near term.

The Clinton, George W. Bush and Obama administrations each bear a share of responsibility for failing to develop and implement a strategy that would have prevented North Korea from developing its current nuclear weapons program. Now it has that nuclear capability, and as the U.S. intelligence community has publicly stated, North Korea is virtually certain not to give up what it considers its only safeguard against an existential threat. If Kim had ever entertained the notion that he would enter a denuclearization agreement with Washington, that idea was forever shelved when the Trump administration reneged on compliance with the U.S. nuclear deal with Iran.

It is now up to the Trump administration to deal with this conundrum and decide the way ahead. There is no good military option vis-a-vis North Korea to force it to denuclearize; a conventional war on the Peninsula could leave a million Koreans and many, many thousands of Americans and other expatriates dead. A nuclear exchange would be far worse. Accepting the reality of a nuclear weapons-capable North Korea under Kim’s mercurial leadership, however, would be a very risky and dangerous pill to swallow. Not only would it pose an ever-present threat to the region and the U.S. homeland, but it also would send the wrong signal to other nuclear weapons aspirants such as Iran, Saudi Arabia and the United Arab Emirates.

The Trump administration rightly continues to insist on North Korea’s “comprehensive, verifiable and irreversible denuclearization,” but the pursuit of this goal will be a long, complicated and frustrating journey requiring “strategic patience.” A sensible approach would be to explore what North Korea is willing to give up and what it expects in return. Might Kim be willing to allow experts from the International Atomic Energy Agency to access and inventory North Korea’s nuclear weapons stockpile and facilities in exchange for some economic assistance? Would he be willing to implement stringent technical safeguards at his nuclear facilities and allow international observers to monitor compliance in a trade for reduced international sanctions? Would he agree to the verifiable destruction initially of some of his nuclear warheads and fissile production facilities over a set period of time for even greater relaxation of sanctions? And if he realizes significant economic and political benefit from these partial steps, might he decide to quicken the pace and extent of North Korea’s denuclearization?

As hard as it was to forge the deal halting Iran’s development of a nuclear weapons program, it will be far more difficult to reach an agreement with North Korea that sharply constrains — much less eliminates — its nuclear and ballistic missile programs. As with most seemingly intractable international problems, especially those involving proliferation matters, a clear-eyed and strategically sound U.S. approach is absolutely essential to making real progress.

The U.S. intelligence community, diplomatic corps and armed forces have world-class experts who are well-schooled on nuclear weapons, ballistic missiles, North Korea and international security matters. During my three and a half decades of working closely with them, I found them neither naive nor passive. Before sitting down for another photo op with Kim, Trump would be well advised to listen to them rather than to his gut.

Read more:

Josh Rogin: Congress sends a warning shot to Moon and Trump on North Korea

The Post’s View: The dangers of a second North Korea summit

David Ignatius: Trump’s summit with Kim Jong Un is partly hot air. It could also make the world safer.

Andrei Lankov: The U.S. can still make progress on North Korea — but time is running out

Josh Rogin: North Korean spy chief’s visit to Washington shrouded in mystery

Thomas J. Byrne: The U.S.-South Korea alliance can withstand the current diplomatic pressures