U.S. Secretary of State John Kerry has been in Vienna, hoping to wrap up talks on Iran's nuclear program and declare success. He needs to be clear that the deal must limit Iran's ability to build a nuclear arsenal for the foreseeable future. Not reaching a deal is better than reaching one which fails to do that.

Right now, that kind of success is looking difficult to achieve. After two days of talks, Iranian Foreign Minister Mohammad Javad Zarif returned to Tehran for consultations, and diplomats conceded they will probably miss Tuesday's self- imposed deadline.

Moreover, in a televised speech last week, Iranian Supreme Leader Ali Khamenei appeared to rule out inspections of military sites. Iran has blocked access to facilities before, but any agreement that bars inspectors from military sites they suspect of being nuclear facilities would be unacceptable. Khamenei also demanded that the economic sanctions which forced Iran to resume negotiations two years ago should be lifted as soon as the deal is signed, rather than in stages to assure compliance. And he said that any restrictions placed on Iran should last for less than the 10 to 12 years that has been proposed.

Each of those is a potential deal-breaker. To see why, it helps to recall some history. The negotiations began 12 years ago, after Iran's covert nuclear fuel program was exposed. They continued for a decade on the basis that Iran should abandon the program entirely. That effort failed. Iran went from having a few primitive centrifuges and no stocks of enriched fuel to an extensive program with enough fuel on hand to build multiple weapons.

President Obama used tougher sanctions to bring Iran back to the negotiating table to discuss an arrangement under which Iran would keep a small, closely monitored fuel program. An interim deal struck in November 2013 halted the expansion of Iran's nuclear infrastructure and eliminated the most dangerous fuel stocks in exchange for limited sanctions relief. That deal remains in effect and is far more beneficial to the U.S. and its negotiating partners than it is to Iran.

Little is lost, therefore, if there's no new agreement, the talks continue, and the status quo persists. The question is what happens if the process collapses altogether. Kerry needs to prepare for this eventuality.

Plan B should focus on ensuring there is support to escalate sanctions when the time comes. The most punishing of these have been imposed by Europe, so keeping the Europeans on board is essential. Equally, Russia, India and others must be persuaded not to actively undermine the sanctions regime. That, in turn, would require the U.S. Congress to be patient.

Many legislators believe that Iran is stringing out the talks to expand its program, as it did during the George W. Bush administration. They're likely to seek new sanctions if no deal can be reached in the coming days. Yet that would breach the terms of the temporary agreement that has prevented Iran from expanding its program. It would give Khamenei the excuse he appears to be seeking to claim bad faith on the part of the U.S. and end the talks altogether. If he succeeds, keeping the international community united behind the effort to restrict Iran's program will become much harder.

Kerry shouldn't sign a bad deal. But for the sake of an effective Plan B, he also needs to ensure that if the process collapses altogether, the blame lies not with the U.S. but with Iran.