In the early hours of a frigid February morning in 1992, the former Soviet Union’s Uzinskaya strategic nuclear bomber base committed a previously unthinkable act. Despite a deal to keep the recently dead USSR’s orphaned nuclear weapons under Russia’s operational control, a regiment of tanker pilots had mutinied against Moscow and declared loyalty to Ukraine, refusing an order to fly their planes to Russia without Kiev’s knowledge

After hydroplaning twice on melted snow and blowing a tire on the two-hour drive from Kiev to the town of Uzin, our group of Western journalists hoped at most to collect quotes at the entrance of the rebellious base. But instead of watchtowers, dogs, and other menacing defenses, only one lone and very young recruit was guarding the gate. For some reason, he let us in.

Once the Soviet Union’s “second” republic, Ukraine hosted thousands of nuclear weapons on its soil and emerged from the Communist empire’s rubble with the world’s third largest nuclear arsenal. Somewhere beyond the snow-covered pine forests surrounding us, the sprawling grounds were home to strategic Tu-95 “Bear” bombers, nuclear gravity bombs, and cruise missiles with navigation systems once aimed for American cities.

We were probably the only foreigners to ever drive unescorted through a just barely formerly Soviet—but still active-duty—strategic nuclear base. When we arrived at the headquarters asking to see the mutinous pilots, they put us in a bare room to wait. A pimply lieutenant came in every half-hour to lie that the officers were busy, weren’t there, were long gone, and had never been there to begin with. Also, could we please leave? We finally did after three hours, accidentally catching the renegades on their way out, before returning to Kiev with the exciting Uzin dateline for our articles.

“There’s an impression that as soon as we disarm, the West will lose all interest in us.” — Anonymous Ukraine official, in 1992

Although the story seemed on the verge of escalating into a terrifying, real-life thriller about “loose nukes”, the issues were later resolved. Russia eventually bought the Bear bombers, like the one that recently buzzed Alaska. That could summarize the story of Ukraine’s post-Soviet nuclear disarmament—potentially terrifying but peaceful in the end—that is, at least for two decades. It also took two very tense years of threats and unrelenting pressure that placed Kiev in a vise between Washington and Moscow.

As the planned summit between Donald Trump and Kim Jong-un approaches, North Korean officials have taken offense at U.S. national security adviser John Bolton’s suggestion that denuclearization should follow the “Libya model,” meaning North Korea would disarm all at once in exchange of concessions. The controversy is understandable: Libyan leader Muammar Qaddafi was toppled and killed several years after giving up his nuclear weapons program. But the North Koreans may also have another precedent in mind, and one with equally disquieting lessons: Ukraine was a country that actually had nuclear weapons, and gave them away for security guarantees that proved illusory.

“There’s an impression that as soon as we disarm, the West will lose all interest in us.” Those words could be on Kim Jong-un’s mind as he contemplates his next move after offering to denuclearize in exchange for security guarantees from the United States. But they came from a Ukrainian official in 1992, when Kiev also wanted to denuclearize in exchange for security guarantees from the U.S.

More than 4,000 nuclear bombs of sundry shapes and sizes then littered the ex-Soviet republic, totaling more than the British, Chinese, and French arsenals combined. Russia’s defense ministry quickly whisked the most portable weapons out, with little say from Ukraine—like it tried with the Uzin planes. But the 1,240 warheads deployed on 176 intercontinental ballistic missiles were harder to snatch. The ICBMs could only be fired from Moscow and were aimed toward the West, but their simple presence in Ukraine turned into a potent political weapon in winning attention from the Bush administration, which initially said it wouldn’t even recognize the independent country.

How well the inexperienced Ukrainian government wielded that negotiating power is debatable, especially now. Led by President Leonid Kravchuk, the “doves” wanted to disarm as quickly as possible. But you can’t just switch off on an ICBM. It takes time, care, and money to do it safely. Aside from deadly liquid fuel in older missiles, removing warheads required electronic “dummy” replacements for the systems to work safely, and those were in short supply.

A few hotheads aside, the “hawks” also wanted to disarm, but they wanted compensation, financial help for disarmament, and, perhaps most importantly, security guarantees.

Meanwhile, U.S. President George H.W. Bush’s attention was focused almost entirely on getting the former Soviet states to ratify START, which was aimed at reducing delivery systems but didn’t address the warheads, the destruction of which would be more difficult to verify. The Americans left the question of warheads up to Russia, designating it the sole official nuclear heir to the Soviet Union.

Despite physical control of these warheads, Ukraine had no access to the physics package—the euphemism for nuclear bomb—inside the weapons. So while Kiev demanded to be recognized as the weapons’ owner and balked at START, only Russia could actually maintain the warheads and it refused to do so.

Ukraine did have some leverage. Its factories built and maintained all of Russia’s top-of-the-line, 10-warhead SS-24 Scalpel ICBMs. Its physical access to the warheads also meant—at least theoretically—it could expose Russia’s top secret nuclear design secrets to Washington. But Kravchuk, afraid of alienating Moscow or the West, refused to play that kind of hardball.

However, this was also when Boris Yeltsin was firing tanks on the Russian Parliament, fomenting separatism in Transdniestria, fighting separatism in Chechnya, and installing a puppet “independent” republic in Ukrainian Crimea. (That was the first time.) Washington’s blithe expectation that Ukraine would simply surrender the warheads to such an aggressive Moscow provoked increasing incredulity in Kiev. (Belarus and Kazakhstan inherited vastly smaller arsenals and followed Ukraine’s lead.)

Hindsight looks different when fighting a nuclear power hell-bent on destroying your country.

When Moscow demanded physical control of the warheads and threatened an invasion to take it, Washington’s silence was taken as assent in Kiev. A U.S. diplomat told me the Bush administration probably didn’t even mind if Ukraine became a part of Russia again. Even Ukrainian doves began complaining that there seemed to be little recognition of the fragile country’s legitimate national security concerns.

Bill Clinton continued pressuring Ukraine on START and the Nuclear Non-Proliferation Treaty, but neither could pass in Ukraine’s Parliament. Perhaps coincidentally, North Korea—also orphaned after the USSR’s demise—announced its own withdrawal from the NPT and won much-needed American attention before changing its mind again, at least for a while. Soon afterward, Washington finally inserted itself into the warhead dispute between Kiev and Moscow, brokering a tripartite deal exchanging the warheads for money and nuclear-reactor fuel. Financially, it was an excellent deal for Ukraine.

But the hawks insisted on binding security guarantees that Washington refused to consider, and Russia—well, Russia was why they were needed. So Kravchuk sidestepped his recalcitrant Parliament—like President Barack Obama did with the Iran nuclear deal—and agreed to much weaker “security assurances.” In the Budapest Memorandum of 1994, Russia, the United States, and the United Kingdom agreed to respect Ukraine’s territorial integrity and not use nuclear weapons against it. But it didn’t bind them to defend Ukraine—or do anything—if the country was invaded.

Kiev also destroyed its ICBM silos, keeping one to make into a museum, complete with a real underground command post, decorated with a list of spartan Soviet food rations on the wall. Outdoors, the destroyed silo is filled with rubble and surrounded by engines, dummy warheads and missiles, and other weapons parts exhibited on the lawn. It should have been dark and disturbing when I visited in 2006. Nuclear-war fears had dogged my Cold War childhood.

But a decade had passed since Ukraine delivered its last warhead to Russia. George W. Bush had looked into Putin’s soul and found Russian support after 9/11. Armageddon seemed distant on a beautiful sunny day in June, with the ICBM detritus like archaeological artifacts from an ancient time when war in Europe still seemed possible. Even the arsenals that remained seemed anachronistic when the geopolitical order rested on the same rules of international law. It was before Putin tested that system with the 2008 invasion of Georgia and then broke it in 2014 in Ukraine.

Reasonable minds can differ on the wisdom of the Obama administration’s response to Russia’s 2014 annexation of Crimea and stealth invasion of eastern Ukraine. The Budapest Memorandum imposed no binding legal commitments, but it did create political obligations—like the Iranian nuclear deal—and Obama deserves credit for pushing Europe to impose sanctions on Russia and significantly increasing financial and technical aid to Ukraine.

But his reluctance to sell lethal weaponry to Kiev, despite rare bipartisan approval, had many in Ukraine feeling betrayed and regretting the disarmament decisions of the early 1990s.

Hindsight looks different when fighting a nuclear power hell-bent on destroying your country. Perhaps it also influenced Pyongyang as it sped up its nuclear program. But the crossed messages from the Trump administration—delivering Javelins to Ukraine but backing out of the Iran nuclear deal—will surely give North Korea even less reason to trust America’s word.