In 1993, North Korea announced its intention of withdrawing from the Non-Proliferation Treaty, nearly leading the Clinton administration to respond with a military attack on the DPRK's nuclear sites.
With tensions rising, U.S. and North Korean officials began negotiations in 1993, which led what was called the Agreed Framework in 1994. By this time, Kim Il Song had died and his son, Kim Jong Il, had taken over. In exchange for abandoning its nuclear weapons program, the United States would provide the North Koreans with nuclear reactors that would produce lower-grade plutonium that couldn't be weaponized.
Despite the agreement, and floods and famine gripping North Korea in the mid- to late-1990s, the country continued developing its medium- to long-range missile technology. The DPRK, claiming they were launching a satellite, even test-fired a rocket that flew over Japan and into the Pacific Ocean.
In 2002, the DPRK acknowledged the existence of its weapons program, which was in violation of its agreement with the United States. The following year the DPRK formally withdrew from the NPT and began producing weapons-grade plutonium from its reactors once again.