North Korea's latest underground nuclear test — punctuated over the weekend by the rocket launch of a satellite that most experts believe is tied to the development of a long-range ballistic missile — has set off an avalanche of analysis regarding the severity of the threat and the ineffectiveness of U.S. policy. Some say our failure to remove Pyongyang's nuclear threat through two decades of diplomacy should now guide our policy with respect to Iran. They argue that just as North Korea agreed to eliminate its nuclear program in the 1994 "Agreed Framework" and then covertly developed a nuclear bomb, Iran will do the same — as unfettered by agreements and the international community as was Pyongyang. But Iran and North Korea should not be mixed and matched, at the risk of getting both wrong at a very high price.

Both countries have, over years, taken actions in violation of their obligations under the Nuclear Nonproliferation Treaty and numerous United Nations Security Council resolutions. Both states threaten U.S. interests and our friends and allies. Both have reportedly cooperated on their missile and perhaps nuclear programs. So there are similarities and dangerous interactions between these two regimes, but the differences are also real and more significant in terms of informing U.S. policy.

First, the North Korean nuclear threat is here and now — and unconstrained. Pyongyang is estimated to have a small number of nuclear warheads that threaten U.S. allies South Korea and Japan as well as U.S. forces in the region today, and its ongoing nuclear and missile programs will, if unchecked, expand this threat, both in terms of numbers and geographic reach. Moreover, there is no agreement in place today to roll back or even check North Korea's nuclear program.

By comparison, Iran today has no nuclear weapons — and has reached an agreement to keep it that way. The Joint Comprehensive Plan of Action, or JCPOA, now in force will preclude Tehran from building a nuclear bomb without violating the agreement in ways that we could detect — and with time (at least 12 months) to take effective action before Iran acquires a bomb.

Second, the U.S. has limited leverage over North Korea. The primary reason is not because the Obama administration or its three predecessors are or were inept. Rather, the North Korean regime and its people remain largely "air-gapped" from the U.S. and the rest of the world — with China being the major exception — limiting the effectiveness of political and economic tools to influence Pyongyang. To make matters more complex, North Korea increasingly sees its small nuclear arsenal as its only leverage with the outside world — and even as essential for the survival of the regime.

In contrast, there are elements of the Iranian regime — and, more important, its people — who seek to reintegrate with the world. Whereas the North Korean people scarcely notice the impact of sanctions on their threadbare existence and have no way of voicing dissent within a brutal police state, Iranians have suffered a real drop in their living standards. And the Iranian people have expressed their dissent with their ballots, electing candidates (albeit chosen by the regime) who promised negotiations over Iran's nuclear program and an end to sanctions. To what extent hard-liners in Iran will now permit reformist candidates to appear on the ballot in elections this month remains uncertain, as does the impact of reformists on a regime whose key leaders and institutions remain conservative at best. But no matter how Iranian politics develop, under the JCPOA and its provisions for "snapback" sanctions, the U.S. and the international community retain significant leverage.

What do these distinctions mean for U.S. policy? Both North Korea and Iran will be at the top of the next administration's foreign policy "to do" list. The question is what to do — and the answer in each case is different.

Our policy with respect to North Korea should be threefold. First, we must strengthen the international coalition confronting Pyongyang (as was crucial in the case of Iran). The key is to get Beijing and Washington on the same page — beginning with a new U.N. resolution with tough penalties for Pyongyang's latest transgressions. This will not be easy given our understandably different perspectives on the North and current tensions in our bilateral relationship. Second, we must devise a new framework for diplomacy, as the current "six-party talks" have run their course. Third, we must have an agreed goal in Washington and with our partners for diplomacy (that is, is the objective to freeze or roll back the North's nuclear capabilities?), and then make clear to Pyongyang what can be gained through engagement, along with the penalties for staying on the current course.

Iran presents a different policy challenge, with an international coalition and an agreement already in place. The focus must be on strictly implementing the JCPOA, making clear to Tehran that effective action will be taken by the international community if Iran were ever to sprint toward a bomb. This will require extraordinarily close consultation and cooperation with Congress, as well as all parties to the JCPOA, including Russia, China, Britain, France, Germany and the European Union.

Most important, we must avoid a situation in which the next U.S. administration equates the nuclear challenge presented by North Korea with Iran, projects our past failures to halt Pyongyang's nuclear program through the 1994 Agreed Framework on future prospects for successful implementation of the JCPOA, and thus acts to renegotiate and replace the JCPOA. In short: Mixing and matching won't do.

Steve Andreasen, the director for defense policy and arms control on the White House National Security Council staff from 1993 to 2001, is a consultant to the Nuclear Threat Initiative in Washington, D.C., and teaches at the University of Minnesota's Humphrey School of Public Affairs.