“I failed my way to success,” renowned inventor Thomas Edison reportedly said.

The same statement could be made by Iran and the P5+1 (The five permanent members of the United Nations Security Council plus Germany) about their ability to get this far in the nuclear negotiations that began in November 2013.

With the current round of talks in Geneva, the parties have reached a climactic moment; they are trying to finalize an agreement before a self-imposed Nov. 24 deadline. No matter what the outcome, it is remarkable that the negotiations have gotten even to this point.

Since the 1979 Iranian revolution, the road of U.S failures in dealing with Iran is a road well traveled. This road was most recently frequented by President George W. Bush.

For years, when it came to negotiating over Iran’s nuclear program, he insisted on the condition that Iran suspend uranium enrichment first. It was revealed in 2013 that in 2004 he made an offer to Iran to reach a grand bargain through direct talks. After Iran’s Supreme Leader Ayatollah Ali Khamenei rejected the offer, the Bush administration went back to its original policy of basing talks on conditions and maintained it until the end of his term.

That policy turned out to be a failure for numerous reasons. First and foremost, Iran has a right to enrich uranium under the Nuclear Non-Proliferation Treaty. Second, because of the zero-sum nature of the Bush approach, many countries, including U.S. allies in Europe, were reluctant to join his campaign against Iran. The Russians and the Chinese, both members of the Security Council, adamantly opposed Bush’s Iran policy.

The election of President Barack Obama changed that dynamic. Less than one month after he entered office, his administration declared its readiness for direct talks with Iran, without conditions. Such willingness by Obama, which he maintained despite Iran’s initial refusal, is one of the reasons the negotiations have made it this far.

Iran has also failed its way to success so far.

There have been many mistakes by the Iranian leadership, the consequences of which finally persuaded Khamenei to approve a new approach. One of his most notable mistakes was to reject offers of talks with the Obama administration for four years.

Obama made his initial offer on Jan. 21, 2009 — the day after his first inauguration. But he had to wait until March 2013, three months before the end of Iranian President Mahmoud Ahmadinejad’s term, before Khamenei approved secret talks with the U.S. in Oman. From 2009 to 2013, not only did Iran spurn direct talks with the U.S, but — as was revealed in October 2011 and later proved in a U.S. federal court — its Islamic Revolutionary Guards Corps was also hatching a plan to assassinate the Saudi ambassador in Washington.