A wristwatch with the image of former Libyan leader Muammar al-QaddafiJoe Penney / Reuters

Of all the countries that might have acted as a spoiler for the summit in Singapore between Donald Trump and Kim Jong Un—China, Russia, Japan, the United States and North Korea themselves—the one that doomed it was unexpected. It isn’t even involved in North Korea diplomacy and is located a long 6,000 miles away from the Korean Peninsula. It’s Libya.

Yet Libya ought to have been top of mind. It’s notoriously difficult to determine what motivates the strategic choices and polices of North Korea’s leaders, but among the factors that has been evident for some time is Kim Jong Un’s fear of ending up like Muammar al-Qaddafi. The Libyan strongman was pulled from a drainage pipe and shot to death by his own people following a U.S.-led military intervention during the Arab Spring in 2011. The North Korean government views its development of nuclear weapons—a pursuit Qaddafi abandoned in the early 2000s, when his nuclear program was far less advanced than North Korea’s, in exchange for the easing of sanctions and other promised benefits—as its most reliable shield against a hostile United States that could very easily inflict a similar fate on Kim. We know this because the North Korean government has repeatedly said as much. “The Saddam Hussein regime in Iraq and the Gaddafi regime in Libya could not escape the fate of destruction after being deprived of their foundations for nuclear development and giving up nuclear programs of their own accord,” the state-run Korean Central News Agency observed in 2016.

Nevertheless, as plans for Donald Trump’s June 12 nuclear summit with Kim Jong Un in Singapore have taken shape in recent days, Trump administration officials have repeatedly invoked Libya. First National-Security Adviser John Bolton, re-upping an argument he often made as a television pundit, called for North Korea to follow the Libyan model of nuclear disarmament—a process he was personally involved in while serving in the Bush administration—and speedily ship its entire nuclear arsenal out of the country while granting international inspectors unfettered access to nuclear sites before receiving rewards. North Korea, by contrast, would prefer to incrementally roll back its nuclear program in return for corresponding political, economic, and security concessions.

Last week, Kim Kye Gwan, North Korea’s first vice minister of foreign affairs, threatened to pull out of the U.S.-North Korea summit, largely over Bolton’s remarks. “It is absolutely absurd to dare compare [North Korea], a nuclear weapon state, to Libya which had been at the initial stage of nuclear development,” Kim declared. “The world knows too well that our country is neither Libya nor Iraq which have met miserable fates.” As for Bolton, “we do not hide our feeling of repugnance towards him.”

Soon Libya morphed from a case study on denuclearization to code for the war that could break out if a denuclearization deal fell apart. Conflating the 2003 disarmament of Qaddafi with the 2011 NATO military operation against Qaddafi into one inscrutable “Libya model,” Trump pledged to offer Kim Jong Un security “protections” that Qaddafi never received in exchange for dismantling his nuclear program. In the same breath, however, he ominously threatened Kim’s security if the North Korean leader refused to trade away his nuclear weapons. “We went in and decimated [Qaddafi]. And we did the same thing with Iraq,” Trump noted. “That model would take place if we don’t make a deal, most likely. But if we make a deal, I think Kim Jong Un is going to be very, very happy.”

By the time Vice President Mike Pence got around to talking about Libya, earlier this week, the North African nation had transformed into an unadulterated ultimatum. “This will only end like the Libya model ended if Kim Jong Un doesn’t make a deal,” Pence told Fox News. “Some people [see] that as a threat,” host Martha MacCallum noted. “I think it’s more of a fact,” Pence responded. “President Trump made it clear the United States of America under his leadership is not going to tolerate the regime in North Korea possessing nuclear weapons and ballistic missiles that threaten the United States and our allies.” Military options to prevent that outcome, he added, “never came off” the table.

That’s when the Singapore summit really started to teeter. Choe Son Hui, a North Korean vice foreign minister, issued a fiery rebuttal denouncing Pence as a “political dummy” and warning that whether the United States encountered North Korea in a “meeting room” or “nuclear-to-nuclear showdown” depended on American behavior. “In order not to follow in Libya’s footstep, we paid a heavy price to build up our powerful and reliable strength,” Choe stated. “I come to think that [the Americans] know too little about us.”

With one letter from Donald Trump to Kim Jong Un on Thursday, the towering hopes for finally resolving the North Korean nuclear crisis and bringing peace to the Korean peninsula came crashing down—for now at least. “Based on the tremendous anger and open hostility displayed in your most recent statement, I feel it is inappropriate, at this time, to have this long-planned meeting,” Trump wrote, tossing in a threat of nuclear war for good measure: “You talk about your nuclear capabilities, but ours are so massive and powerful that I pray to God they will never have to be used.” He did not mention Libya.

But then, while the collapse of the most daring diplomatic initiative in decades was in a sense all about Libya, it was also never really about Libya. It was about the United States and North Korea, after initially ducking for cover behind South Korean intermediaries, coming out into the open ahead of their summit and staking out their positions on denuclearization. It turned out the two sides were worlds apart on the meaning of that all-important term—a distance that no amount of pageantry and promises and pep talk from South Korea could bridge. U.S. officials looked at Libya and saw an encouraging lesson for how to defuse the threat from a rogue state. North Korean officials looked at Libya and saw a cautionary tale for how to not end up dead at the hands of a superpower.