In mid-April 2017, Trump and his top national security officials gathered in the Oval Office for a briefing on North Korea. Trump sat behind his massive Resolute desk as officials crowded in around him, including Steve Bannon, Jared Kushner, and H. R. McMaster. The briefing consisted largely of highly classified images of North Korea’s nuclear facilities and military sites.

The briefers knew that Trump was more of a visual learner than a briefing book kind of guy, so the National Geospatial-Intelligence Agency (NGA) had made a three-dimensional model of a secret North Korean facility that they brought in to the Oval Office. Virtually unknown outside of Washington, NGA played a critical role in assessing intelligence derived from satellites and other sources. NGA had built a similar model of bin Laden’s compound in Pakistan that Obama’s war cabinet had found useful as they planned the raid that would end up killing al-Qaeda’s leader. The briefers placed the model of the North Korean building in front of Trump. Trump was fascinated by the model, which was about the size of a coffee table. The president asked just how strong the defenses were around the secret North Korean facility.

During the transition, when Trump had met with Obama at the White House, Obama had told the president-elect that North Korea would be his biggest foreign policy headache. Trump took the problem seriously and made it a priority that he was going to try to solve using a combination of “maximum pressure” involving tightening tough sanctions on North Korea and, maybe, by trying to do a deal with the regime to disarm, a deal that had eluded previous presidents for decades.

North Korea launched two long-range missiles during the first half of April 2017. The missile launches threatened American allies like Japan, and ultimately they seemed poised to hit American targets such as Guam and Hawaii. Satellite imagery showed that North Korea was now expanding its underground nuclear testing facilities. During his first months in office, Trump frequently wondered out loud, “How is it possible that presidents from Eisenhower on have allowed a country to reach a point where it could destroy an American city and have not responded?”

As the briefing on North Korea progressed in the Oval Office, Trump suddenly turned on McMaster, telling him, “You need to fucking fire the press people at the Pentagon!”

Trump had been stewing for days because he had publicly warned that an American “armada” was steaming toward North Korea, but it turned out that the armada led by the USS Carl Vinson aircraft carrier was in fact somewhere off the coast of Australia heading in completely the opposite direction, information that was confirmed to the media by low-level spokesmen at the Department of Defense.

No one in the Oval Office said anything about Trump’s desire to fire the officials in the Pentagon press shop. They were simply doing one of the key parts of their jobs, which was to correct inaccurate information.

During the Oval Office briefing, Trump was shown a well-known satellite image of North Korea at night. On North Korea’s northern border was China awash in pinpricks of light, while to the south was South Korea also all lit up at night. Between China and South Korea was an almost entirely dark North Korea with only a tiny, faint light emanating from its capital, Pyongyang. The image eloquently told the story of the almost total failure of the North Korean economy.

At first, Trump was disoriented by the North Korean portion of the photo, asking: “Is that the ocean?”

Gradually Trump began to focus on the photo, looking closely at South Korea and its capital, Seoul. The distance from the North Korean border to Seoul was only fifteen miles.

Trump remarked: “Why is Seoul so close to the North Korean border?”

Trump was regularly briefed that North Korea possessed vast numbers of artillery batteries that could potentially kill millions in Seoul in the event of a war.

Referring to the inhabitants of Seoul, Trump said, “They have to move.”

The officials in the Oval Office weren’t sure if Trump was joking.

Trump repeated, “They have to move!”

Seoul was one of the largest cities in the world with a population of twenty-five million, more than the population of Australia. Was the president seriously suggesting that twenty-five million people needed to leave their homes in Seoul and move elsewhere? No one knew what to say.

During 2017, North Korea launched twenty missile tests that increasingly threatened American targets. On July 4, North Korea launched an intercontinental ballistic missile capable of reaching the continental United States. With a guffaw Kim Jong Un told a North Korean news agency: “The American bastards must be quite unhappy after closely watching our strategic decision. I guess they are not too happy with the gift package we sent them for the occasion of their Independence Day.”

The intensifying North Korean missile launches pushed China, long a close ally of the North Koreans, to adopt a more skeptical posture to the Kim Jong Un regime. Trump skillfully switched the security conversation with the Chinese, which was all about the South China Sea and potential conflict between China and the United States and turned it into one of cooperation over North Korea. Trump presented this in a way that guaranteed Chinese interests, which was the maintenance of a buffer North Korean state between China and South Korea. Trump insisted that the United States wasn’t interested in regime change in North Korea or the unification of the Korean Peninsula and that the United States was quite happy to have North Korea survive as long as it didn’t have the capability to strike the American homeland. This reassurance helped to get the Chinese to play a role in the enforcement of United Nations sanctions against North Korea.

The US ambassador to the United Nations, Nikki Haley, adeptly steered significant sanctions against the North Koreans that the Chinese also supported through the UN Security Council. The sanctions included cuts to oil imports to North Korea as well as making it illegal for the North Koreans to export coal, iron ore, and seafood. The sanctions also obligated countries around the world to seize North Korean ships that were engaged in sanctions-busting. The new sanctions started undercutting Kim’s key goal of improving the terrible North Korean economy.

Meanwhile, Mattis was slow rolling any kind of potential military response against North Korea. When Vice President Pence and McMaster planned for a war game at Camp David in the fall of 2017 so they could better understand the military options that the United States had in North Korea, Mattis simply ignored their requests for support for the war game. Mattis never sent any military planners for the war game and so the session never happened. McMaster also wanted the US Navy to provide options about intercepting North Korean ships that might be sanctions-busting. Mattis refused to provide those options because he worried that such interceptions might spiral out of control and spark a wider conflict.

During the fall of 2017, Trump started ramping up his rhetoric against Kim, trolling the stocky North Korean dictator on Twitter and also ridiculing him at his raucous rallies, calling him “Little Rocket Man.”

At the same time, Trump poured considerable cold water on outreach by the State Department to the North Koreans, tweeting, “I told Rex Tillerson, our wonderful Secretary of State, that he is wasting his time trying to negotiate with Little Rocket Man. Save your energy Rex we’ll do what has to be done!”

Standing next to his top generals, who were gathered for an annual formal dinner at the White House in early October 2017, Trump cryptically told reporters that they might be witnessing “the calm before the storm.” What did this mean? It wasn’t clear, but it added to the jitters about a possible war with North Korea.

Before the dinner, in front of a group of White House reporters in the Cabinet Room, Trump had demanded that his generals “provide me with a broad range of military options, when needed, at a much faster pace.” Clearly, the commander in chief was beginning to realize that Mattis’s Pentagon was slow rolling the military options that he expected to have available to him, and Trump was willing to call out his top generals publicly about it.

The same month that Trump met with the generals, the air force held an elaborate three-day exercise in the Ozark Mountains of Missouri, which bear some resemblance to the topography of North Korea, and dropped the largest nonnuclear bomb in the US arsenal, the bunker-busting 22,000-pound Massive Ordnance Air Blast bomb that had been deployed in Afghanistan in April 2017.

On January 2, 2018, Trump tweeted, “North Korean Leader Kim Jong Un just stated that the ‘Nuclear Button is on his desk at all times.’ Will someone from his depleted and food starved regime please inform him that I too have a Nuclear Button, but it is a much bigger & more powerful one than his, and my Button works!”

Three weeks later, Trump was watching Fox News. On-screen was General Jack Keane, the retired four-star general whom Trump had wanted to be his secretary of defense, who was advocating measures the Trump administration could take to increase pressure on the North Koreans. Keane, who acted almost as a shadow national security adviser for Trump, advised that a signal that the North Koreans would certainly understand that the United States was serious about a possible military operation against them would be to “stop sending the military families to South Korea. That doesn’t make any sense to me whatsoever. It should be what we call an unaccompanied tour. Troops only.”

Trump told his national security team, “I want an evacuation of American civilians from South Korea.”

A senior White House official tried to object, saying, “Well, sir, if you’re trying to signal that you’re ready to strike and start a war; if you’re trying to crash the South Korean stock market; if you’re trying to alienate an ally of seventy years: This is the way to do it.”

Trump ordered, “Go do it!”

Pentagon officials were panicked by Trump’s order. Chief of staff John Kelly talked to Trump and said, “Look, this is really complicated. This has a lot of moving parts. I’d like to request that you give us the time to work this through and we’ll have options to present to you.”

Pentagon officials were quite reluctant to make South Korea an unaccompanied tour as they thought that it would be provocative to the North Koreans, who would likely view it as an act of war. Over time, Trump simply dropped the idea.

The Trump administration and North Korea seemed perilously close to going to war. And then the unexpected happened. Trump watched South Korean president Moon Jae-in do something groundbreaking, which was to invite the North Koreans to the Winter Olympics in South Korea held during February 2018. By having the North Koreans attend the Olympics, and even have them march together in the Olympic parade with their South Korean counterparts, Moon created an opening for Trump. Trump saw an opportunity to break a dynamic that was leading the United States into conflict with North Korea and instead to focus on a meeting between himself and Kim Jong Un. With the South Koreans operating as a back channel, on March 8 Trump accepted Kim’s invitation to meet.

It was five days later that Trump fired Rex Tillerson as secretary of state. Part of Trump’s calculus had been that if he was going to be in a long-term process of negotiations with the North Koreans, he did not want Tillerson at the table. Trump had already turned over the North Korean portfolio to CIA director Mike Pompeo, now elevated to be secretary of state.

In April 2018, Kim declared that he was suspending nuclear weapons and missile tests. However, Trump’s newly minted national security adviser, John Bolton, seemed intent on sabotaging any accommodation with the North Koreans. A month before he had started to work at the White House, Bolton had written a piece for the Wall Street Journal in which he laid out the purported legal arguments for a preemptive war against North Korea. This would be a redo of the invasion of Iraq in 2003.

Within weeks of taking up his position as national security adviser, Bolton said publicly that the administration was contemplating the “Libya model” for North Korea. This referred to the Libyan dictator Moammar Gaddafi, who had agreed to abandon his weapons-of-mass-destruction program in the early 2000s in exchange for lifting the onerous sanctions that were then in place on his regime. A few years later, in 2011, US-backed rebels toppled Gaddafi’s regime. The rebels then hunted Gaddafi down and killed him in a ditch. For Kim, the “Libya model” was code for regime change; Kim had no intention of ending up dead in a ditch. Keeping his nukes was key to Kim’s plan to remain in power indefinitely.

The North Korean first deputy prime minister, Kim Kye-gwan, said of Bolton, “We do not hide our feeling of repugnance towards him.”

Sarah Sanders, the White House press secretary, quickly distanced the administration from the “Libya model,” saying, “I’m not aware that that’s a model that we’re using.”

Trump met in Singapore with Kim on June 12, 2018. The symbolism of the two leaders meeting was undeniably important since it seemed that a war between their countries was a real possibility just a few months earlier, but the pageantry of the summit couldn’t disguise the fact that the two leaders didn’t agree on much of anything of substance. Both sides agreed on the need for “denuclearization,” but that term meant radically different things to Trump and to Kim. It was a longstanding goal of American foreign policy to achieve the “complete, verifiable, irreversible dismantlement” of the North Korean nuclear program. For the North Koreans, denuclearization meant getting the United States to withdraw any American nuclear weapons in the region surrounding North Korea and also to formally end the Korean War, which would entail a peace agreement and the withdrawal of the twenty-eight thousand American soldiers stationed in South Korea.

At the end of the Singapore meeting, Trump announced that he would be stopping joint US–South Korean military exercises. This announcement hadn’t been coordinated with the Pentagon or with the South Koreans and it surprised Mattis. Trump also adopted the language that the North Koreans used for these joint exercises, describing them as “war games.”

Trump took to Twitter to declare, “There is no longer a Nuclear Threat from North Korea.” There was absolutely no evidence for this, but Trump basked in the notion that he should be awarded the Nobel Peace Prize. A nuclear deal with the North Koreans had eluded three previous presidents, but Trump believed he could pull it off. From a negotiating standpoint, Trump had claimed victory before anything had really changed and now he had a strong incentive to ensure that some kind of deal—any kind of deal—was struck with Kim.

Four months after the Singapore summit, Trump spoke at a Make America Great Again rally in West Virginia, where he declared his love for the North Korean dictator, saying of Kim, “I was really being tough, and so was he. And we would go back and forth. And then we fell in love, okay? No, really. He wrote me beautiful letters, and they’re great letters. We fell in love.”

Despite the letters, which were surprisingly affectionate—almost like a son talking to a father—the love fest didn’t pay off. Dan Coats, the top US intelligence official, on January 29, 2019, testified before the Senate Intelligence Committee that the consensus of the intelligence community was that North Korea was “unlikely to completely give up its nuclear weapons and production capabilities because its leaders ultimately view nuclear weapons as critical to regime survival.” Trump, who had a history of warring with his own intelligence agencies, was enraged by the coverage of Coats’s testimony, which he believed undercut his efforts with Kim.

A month after Coats’s testimony, Trump and Kim met again, this time in Hanoi, the capital of Vietnam. Trump wanted to go big and persuade the North Koreans to give up their nuclear weapons material and production facilities in exchange for the lifting of all sanctions. As Coats had predicted, Kim rejected this proposal. Instead, the North Koreans put on the table ceasing the production of plutonium at their Yongbyon nuclear facility, which was a well-known source of material for North Korea’s nuclear weapons, in exchange for the removal of all the United Nations sanctions enacted since 2016. Trump decided to walk away from the negotiating table since the North Korean offer left other uranium enrichment facilities functioning in North Korea, while dropping the UN sanctions would have ended any leverage he had over the North Koreans.

Three months after the failed talks in Hanoi, the North Koreans launched some short-range ballistic missiles. At a press conference in Japan in late May 2019, Trump contradicted Bolton, who had just told reporters that those launches contravened UN Security Council resolutions. Trump said he wasn’t bothered by the launches and he observed that Kim was a “smart man.”

During his Japan trip, Trump also tweeted that he agreed with a recent statement by Kim that his Democratic rival, Joe Biden, was a “fool of low IQ.” It was unprecedented for a president to deploy the talking points of a longtime enemy of the United States to attack a domestic political opponent.

A month later, Trump was in Japan again for a meeting of the world’s largest economies, known as the G20. On June 29, Trump tweeted from his hotel room a seemingly spontaneous invitation to Kim to meet at the Korean Demilitarized Zone. “If Chairman Kim of North Korea sees this, I would meet him at the Border/DMZ just to shake his hand and say Hello(?)!” Trump tweeted.

At the Demilitarized Zone, Trump took a few steps into North Korean territory and so became the first sitting American president to visit North Korea. Trump and Kim shook hands for the cameras. Both men put a great premium on iconography and they both got the photo op they wanted. The tin-pot dictator, whose country’s entire economy was smaller than that of the state of Vermont, was meeting the leader of the world’s superpower as a peer, while Trump could claim that he had averted a war with the North Koreans.

Trump continued to view his rapprochement with Kim as his best road to Oslo to pick up a Nobel Peace Prize. And he would have certainly deserved the prize if he had been able to come to some sort of accommodation with Kim where the North Koreans significantly cut back their nuclear program in exchange for real sanctions relief and there was a true normalization of relations between North Korea, South Korea, and the United States.

Trump engineered an unprecedented opening with North Korea and significantly lowered tensions with the eccentric, brutal nuclear-armed state, but his efforts to dismantle its nuclear weapons program ultimately led nowhere, as others had in the past. The love fest between Trump and Kim continued, but so did Kim’s nuclear weapons production.