There are still nearly two months to go before the deadline for an Iran nuclear agreement, but already both sides are preparing for the possibility that talks might fail.

In New York last week, Iranian President Hassan that while, “Everything is based on the expectation — God willing — that we will reach success… [but that] doesn’t mean if we fail to reach agreement, we will go back to the past.”

Column: Plan B for an Iran Nuclear Deal?

In Washington, David Albright, president of the Institute for Science and International Security and an influential voice with the Barack Obama administration and on Capitol Hill, said Tuesday at an event on the nuclear talks that “both sides would have incentives not to escalate” if they cannot conclude a long-term deal. Iran, Albright suggested, would continue to limit its uranium enrichment program and avoid other steps that could provoke a harsh response, including possible military action.

Column: Plan B for an Iran Nuclear Deal?

Even as the rest of the Middle East heats up because of conflict with the group that calls itself the Islamic State (IS), tensions with Iran have reduced markedly since the resumption of nuclear talks a year ago. Evidence of Iran’s improved international stature came in Rouhani’s meetings this year at the U.N. General Assembly with French President Francois Hollande and British Prime Minister David Cameron – the first such high-level encounter between Iran and Britain since the 1979 revolution. Rouhani’s predecessor, Mahmoud Ahmadinejad, had to content himself with seeing counterparts from fellow pariahs like Venezuela.

Column: Plan B for an Iran Nuclear Deal?

These diplomatic breakthroughs reflect not just the crisis over IS but the fact that Iran has scrupulously fulfilled its commitments under an interim nuclear deal achieved last November and extended for another six months in July.

In return, Iran has received limited sanctions relief which – along with better management by Rouhani’s team – has brought the Iranian economy out of two years of recession and cut inflation in half.

Trade with the European Union is up 11 percent in the first six months of this year, according to Bijan Khajehpour, an expert on the Iranian economy. Even if the current level of sanctions continues, he predicted at the Woodrow Wilson International Center for Scholars on Monday, trade with Europe and Russia – as well as so-called “triangle solutions” that involve third party intermediaries such as Oman and Iraq – will increase.

Obviously, the Iranian economy would do much better if all nuclear-related sanctions were suspended, particularly those that constrict the banking and energy sectors. But Iran is used to muddling through and has probably already withstood the worst of the U.S.-led sanctions regime. Even if the U.S. imposes new penalties on Iran should no deal be reached by Nov. 24, it is unlikely that other nations will follow — particularly if Iran is perceived to have put forward a reasonable solution to the nuclear crisis.

Obviously, a long-term nuclear agreement would be a major political accomplishment for both the Rouhani and Obama administrations. However, failure also has some political upsides. In both countries, hardliners are poised to criticize any concessions as appeasement and nervous allies -- Hezbollah for Iran, Israel and Saudi Arabia for the United States -- fear any improvement in the U.S.-Iran relationship. If no comprehensive deal is reached, Iran and the U.S. can argue that it was because they stood on principle. Both can say that for them, no deal was better than a bad deal.

Even as Rouhani dangles the possibility of a “completely different” relationship with the United States if the nuclear negotiations succeed, failure would allow Supreme Leader Ayatollah Ali Khamenei to sidestep the implications for a regime built on twin pillars of geopolitical independence and hostility to the U.S.. Ad hoc cooperation and even high level consultations with U.S. officials could continue without the unsettling prospect of a U.S. Embassy reopening in Tehran.

Much would depend on how the negotiations fail. At present, Iran is still holding fast to keeping about 10,000 centrifuges spinning while suggesting that 900 other machines could be disconnected and those still operating spin at lower rates or with less uranium gas injected. The has reportedly edged up from 1,500 centrifuges to 4,500. If Iran agrees to reduce the number to 7,000 – as an Iranian source has told this reporter – that might be enough to sway Russia and China – not to mention a host of developing nations and Iranian neighbors – to resume normal trade with Iran.