From The Great Successor: The Divinely Perfect Destiny of Brilliant Comrade Kim Jong Un, by Anna Fifield (PublicAffairs, 2019), Kindle pp. 232-234:
In 1962, the Soviet Union and the United States were locked in a thirteen-day standoff over the installation of nuclear-armed Soviet missiles in Cuba, less than one hundred miles from the US coastline. For those two weeks, the world teetered on the edge of nuclear war. But the conflict was resolved diplomatically when Soviet leader Nikita Khrushchev agreed to remove the missiles as long as President John Kennedy agreed not to invade Cuba. A deal was done.
Kim Il Sung viewed this deal as a capitulation by the Soviet Union to the United States, a sign that Moscow was willing to sell out an ally for the sake of its own security. The Great Leader apparently learned from this that North Korea should never entrust its national security to any other government. This injected new momentum into his drive for nuclear independence. Within a few months, Kim Il Sung’s regime had started to explore the possibility of developing a nuclear deterrent of its own. The leader who had espoused a need for a stronger agricultural policy was soon standing before the cadres in Pyongyang to hammer home the importance of putting equal emphasis on economic growth and national defense. This was the first “simultaneous push” policy. The proportion of the national budget devoted to defense rose from only 4.3 percent in 1956 to almost 30 percent within a decade.
The nuclear scientists who returned home from the Soviet Union set about building, about sixty miles northeast of Pyongyang, a similar complex to the one they’d worked at in Dubna. This would eventually become the Yongbyon Nuclear Research Complex.
More impetus came in the early 1970s, when it emerged that North Korea’s other main ally, China, had secretly started to forge relations with the United States, an effort that led to President Richard Nixon’s historic visit to Beijing in 1972.
Meanwhile, in South Korea, the strongman Park Chung-hee, a general who’d seized the presidency through a military coup, was secretly pursuing nuclear weapons of his own. When this news emerged, it was an unbearable blow to Kim Il Sung’s personal vanity and sense of national pride.
Another key factor that must have been weighing on Kim Il Sung’s mind was his own mortality. He was in his sixties by this time and was starting to prepare his son to take over. He thought that having nuclear weapons would make it easier for his son to keep a grip on the state. In lieu of charisma, Kim Jong Il should at least have nukes.
In the late 1970s onward, the North Koreans had built more than one hundred nuclear facilities at Yongbyon alone. American intelligence agencies were alarmed. In the space of about six years, a country with no previous experience had built a functioning nuclear reactor. Three years later came unambiguous proof that the reactor’s purpose was military, not civilian; the country had built a major reprocessing facility that would enable it to turn the fuel from the reactor into fissile material.
But its efforts were not going unnoticed among allies either. The Soviet Union pressured Kim Il Sung into signing the Nuclear Non-proliferation Treaty at the end of 1985. It took seven years for North Korea to allow in the inspectors required under that treaty, and when they got in, they found numerous signs that the regime was secretly working on the very kind of nuclear program it had pledged against. In 1993, Kim Il Sung threatened to withdraw from the treaty, triggering an alarming standoff. North Korea and the United States came the closest to war in forty years.
Talks to resolve the impasse were ongoing when Kim Il Sung suddenly died in the summer of 1994, propelling both sides into unknown territory. They did, however, manage to sign a landmark nuclear disarmament deal called the Agreed Framework, under which North Korea agreed to freeze and eventually dismantle its nuclear weapons program and a US-led coalition agreed to build two civilian nuclear reactors that could be used to generate electricity for the energy-starved country.
Pyongyang had no intention of abiding by this agreement either. Signing the deal was all about buying the Kim regime time to work on its program while maintaining the appearance of cooperating.
North Korea had developed a close relationship with Pakistani nuclear scientist Abdul Qadeer Khan. In the 1990s, while North Koreans were dying of starvation and while Kim Jong Un was watching Jackie Chan movies in Switzerland, the regime was building a uranium-enrichment program. Uranium enrichment wasn’t technically covered under the Agreed Framework. And North Korea loves technicalities.