His initial offer of engagement led to nothing with firebrand President Mahmoud Ahmadinejad and was complicated by the mobilisation of pro-reform mass demonstrations led by the Green Movement. But Obama seized the opportunity to end three decades of estrangement following the election of the moderate President Hassan Rouhani last June.
According to reports by AP and Al-Monitor, he instructed his Deputy Secretary of State William Burns to open a secret back-channel to Iranian officials. The clandestine parallel talks which ran alongside the official negotiations involving the US, UK, France, Russia, China and Germany, were widely credited with paving the way for the breakthrough accord.
Every US president since the 1979 US hostage-taking under Jimmy Carter has been haunted by the Islamic theocracy whose watchword remains "Death to America". In the 1980s, Ronald Reagan's presidency was bedevilled by the arms-for-hostages Iran-Contra affair, and by the 1988 shooting down of a civilian Iranian airliner by a US guided missile cruiser in the Gulf.
After the 9/11 terror attacks there were brief hopes of a new dawn under the pro-reform Iranian President, Mohammad Khatami, who condemned the al-Qaeda atrocity. The two countries co-operated on Afghanistan and Iraq. But President George W. Bush branded Iran as part of an "axis of evil" with North Korea and Iraq.
In November 2004, Iran agreed to curb its nuclear programme in return for technological and economic incentives from three European powers. But that deal fell apart amid recriminations on both sides, and the election of President Ahmadinejad stymied further progress.
Iranian and Western officials acknowledge that the years of mistrust cannot be quickly overcome. Iran will still need convincing that the West is not bent on regime change, and the West requires verifiable proof that Iran's nuclear programme is as peaceful as the Iranians maintain.
But the Obama Administration clearly hopes that an era of co-operation with Iran could dissipate the threat of another war as America extricates itself from Iraq and Afghanistan. Although Netanyahu claimed before Sunday that the "bad deal" with Iran would mean that war would be more likely, the Israeli military and intelligence establishment have in recent days distanced themselves from that position.
The Obama Administration hopes that a relationship with Iran could unlock other intractable conflicts, including possibly in Syria where Iran and Saudi Arabia are fighting a proxy war. Iran continues to arm the Shia Hizbollah militants who are fighting on the Syrian Government side. It's not impossible that cooperation could stretch to the Israeli-Palestinian conflict, where Iran has nurtured ties with the militant Hamas movement that rules Gaza. Obama named a Middle East envoy in the first days of his presidency and is now making a renewed attempt to secure a viable two-state solution for Palestinians and Israelis. However, every American president before him has lost his shirt in the search for Mideast peace.
So the strategic ripples from Sunday's accord are historic. If negotiations are pursued, and if the international sanctions do not erode as Iran clearly hopes given the fresh momentum, the deal with Tehran could be on a par with President Richard Nixon's rapprochement with China.