Workers clean Shaheen missiles before a military parade in Islamabad, Pakistan, in March.Caren Firouz / Reuters

When Donald Trump canceled his planned summit with North Korean leader Kim Jong Un—before hinting that it might happen anyway after all, as the South Koreans moved into damage-control mode on Saturday with an impromptu summit of their own—it followed days of discussion over a historical parallel: Libya. U.S. National-Security Adviser John Bolton said the basis for a deal with North Korea was the “Libya model” from 2003 to 2004, when Muammar Qaddafi essentially handed over his entire nuclear program to the United States. For North Korea, however, this allusion to Libya looked “awfully sinister” because, in 2011, less than a decade after Libya appeased the West, the United States and its allies joined with local rebels to topple Qaddafi’s regime.

For Pyongyang, Libya is not the only warning from history about the perils of disarmament. In 2003, Iraq claimed to have abandoned its pursuit of weapons of mass destruction, and even allowed inspectors back into the country, but nevertheless endured a U.S. invasion and regime change. In 2015, Iran agreed to limit its nuclear program in exchange for sanctions relief, but in 2018 Trump tore up the deal.

So are there any models of “rogue” regimes with nuclear programs that might appeal to North Korea? The answer is yes. But, unfortunately, it’s a state that kept its nuclear deterrent intact: Pakistan. If Pyongyang is weighing up two possible futures—Libya vs. Pakistan—it’s not much of a choice.

Pakistan began to seriously pursue nuclear weapons in the 1970s, motivated by a desire to deter its more powerful rival India, as well as match India’s nuclear capability. The Pakistani politician Zulfikar Ali Bhutto, who later became prime minister, claimed, “If India builds the bomb, we will eat grass or leaves—even go hungry—but we will get one of our own.” In 1998, on a clear and bright day in the Chagai district, Pakistan carried out a series of nuclear tests. Pakistan’s chief scientific officer said “All praise be to Allah” and pushed the button, causing the mountain to shake in a vast explosion.

In 2016, the Bulletin of the Atomic Scientists estimated that Pakistan had 130 to 140 warheads and predicted that it would nearly double its arsenal by 2025. Islamabad could deliver nuclear weapons by medium-range ballistic missiles, cruise missiles, F-16 fighters, and tactical systems for short-range use on the battlefield.

We can be confident that North Korea is paying close attention to Islamabad’s experience. After all, the two countries share important similarities. They both face an enduring rivalry with a far more powerful democratic state that used to be part of the same country (India and South Korea). Furthermore, both North Korea and Pakistan have, at times, flouted international norms. In 2003, North Korea withdrew from the Non-Proliferation Treaty. Pakistan never signed the treaty. For decades, North Korea and Pakistan have been informal allies, trading conventional weapons and supporting Iran in the Iran-Iraq War.

Another reason that Pyongyang is certain to consider the Pakistan model is that the two states have cooperated on nuclear development. In 2006, the Congressional Research Service reported that Pyongyang gave missile technology to Islamabad, and Pakistan transferred nuclear technology to North Korea, through the network of the Pakistani nuclear engineer Abdul Qadeer Khan. During the 1990s, when North Korea suffered a famine that killed perhaps 500,000 people, and North Koreans literally ate grass and leaves, Pyongyang continued to prioritize military development and received key data from Pakistan on uranium enrichment. Pakistan is even suspected of having carried out a nuclear test for North Korea.

From North Korea’s perspective, the Pakistan model must look compelling. First of all, Pakistan’s nuclear weapons have successfully deterred India. The 1960s and 1970s were a time of humiliating military defeats for Pakistan, including the 1971 Indo-Pakistani War, when Pakistan lost 56,000 square miles of territory, which became the new state of Bangladesh. Nuclear weapons have essentially removed the possibility of a large-scale Indian invasion. In 1987, President Muhammad Zia-ul-Haq told his Indian counterpart, “If your forces cross our borders by an inch, we are going to annihilate your cities.” In 1999, Pakistani troops crossed into Indian-controlled Kashmir, triggering the Kargil Crisis and military hostilities. Crucially, India avoided escalation, kept the war limited, and declined to enter Pakistani territory. One study concluded “the principal source of Indian restraint was Pakistan’s overt possession of a nuclear arsenal.”

In addition, Pakistan’s nuclear capability led the West to handle the country with kid gloves. The United States provided millions of dollars of material assistance to guard Pakistan’s nuclear stockpile, including helicopters and nuclear detection equipment. Pakistan’s nuclear capability is also one reason why Washington continued to provide billions of dollars in military and economic aid, even though Islamabad supported the Taliban insurgency that battled U.S. troops in Afghanistan.

Meanwhile, Pakistan gained prestige as the only Muslim-majority country with nuclear weapons. The Pakistani Ministry of Foreign Affairs described the nuclear program as “Pakistan’s finest hour.” The nuclear program is also domestically popular. The nuclear tests in 1998 that shook mountains led to jubilant street celebrations.

Of course, all of this came at a cost. The money poured into Pakistan’s nuclear program could have been spent on health or education. The nuclear tests in 1998 were condemned around the world. After refusing to sign the Non-Proliferation Treaty, Pakistan faces restrictions on importing civilian nuclear technology. Nuclear weapons may deter India, but they also risk accidents and even escalation to nuclear war.

But for North Korea, the balance sheet still favors the Pakistan model: a poor country that ate grass to build a nuclear deterrent, seeks to be accepted as a recognized nuclear power, supports denuclearization in principle but only as part of a broader international disarmament effort (that will likely never happen), successfully deters a more powerful rival, and gains domestic prestige and international status.

Saddam and Qaddafi made their choices, and they’re both dead. North Korea wants to follow a different path. Why not become the Pakistan of East Asia?