The sad truth of Sunday’s nuclear agreement with Iran is that it could have come 10 years earlier and with far fewer costs.

It took a Mideast war, an accelerating nuclear program, a crisis with U.N. inspectors and crippling sanctions before the sides started talking.

More importantly, it was the election of President Obama and the return of the reformist leadership in Tehran that made an historic deal between the United States and Iran even possible.

For Obama, the possibility of peacefully ending 30 years of hostilities between the two nations - and the threat posed by the uncertainty of Iran’s nuclear program - has been a sought-after goal since his first moments as the 44th president of the United States.

His 2009 inaugural address made those ambitions clear even as Iran was governed by the hostile leadership of former President Mahmoud Ahmadinejad.

“To those who cling to power through corruption and deceit and the silencing of dissent, know that you are on the wrong side of history; but that we will extend a hand if you are willing to unclench your fist,” Obama said in the opening hour of his presidency.

Though he never wavered from that sentiment, Obama had little room to run without a partner on the other side. That finally came this year, when Hassan Rouhani was elected as Iran’s president, returning to the world stage with committed reformists who had long sought to heal wounds with the West.

Chief among the key players is his foreign minister, Javad Zarif, an architect of Sunday’s deal and one of the best known Iranian figures in Washington. This wasn’t Zarif’s first attempt at reconciliation on behalf of the Persian people. But like Obama, he too lacked a partner when he first tried to reach out more than a decade ago.

That was before there was an operating plutonium plant in the town of Arak, enriched uranium at underground facility in Natanz or an Iranian leadership bent on vilifying Israel and inflaming world ire.

When the United States was attacked by Al-Qaeda on Sept. 11, 2001, it was by a terrorist organization that was no friend to Iran.

Acting from inside Afghanistan and Pakistan - two nations that border Iran - al-Qaeda’s actions destabilized the region and brought on a swift counterattack by U.S. forces who remain in the region.

Hundreds of al-Qaeda members streamed across Iran’s borders. Many were caught and identified. The most dangerous, including Osama bin Laden’s relatives, were imprisoned. Low-level fighters were returned to their home countries - but not before Zarif secretly shared their identities, finger prints, passports and other information with the U.S. government.

There was other quiet but vital cooperation along the Iranian-Afghan border to stop al-Qaeda, the heroin trade and warlords from smuggling weapons and goods out of Afghanistan.

The Bush administration benefited greatly from all of it but that’s not the impression it conveyed to the American public or the Iranian people.

Iran’s leaders, working through a Swiss diplomatic channel, sent the State Department a lengthy proposal for embarking on negotiations. Tehran’s leaders sought a “grand bargain,” with everything on the table, including restoring relations with Israel, and giving up any interest in pursing nuclear capabilities that could be used for weapons.

If only they had been greeted with silence. Instead, Bush used his 2003 State of the Union address to enlist Iran into what he deemed an “axis of evil,” along with Iraq and North Korea.

Within two months, operating on his doctrine of preemption, Bush invaded Iraq and had troops on two of Iran’s major borders. His stable of neo-conservative advisers made no secret of their conviction that Iraq was a “demonstration effect,” meant to weaken and pressure Iran.

It had the opposite effect. With Saddam Hussein and the Taliban removed from power, Iran’s influence in the region only grew, particularly in Iraq where U.S. troops struggled with a violent insurgency that eventually claimed the lives of more than 4,000 American troops.

And when an Iranian dissident group revealed a small but secret nuclear effort underfoot at Natanz in Iran, Iran moved quickly to fortify and defend it on the world stage. Years of concealment and obfuscation on the part of Iran defined a bitter relationship with U.N. inspectors who only gathered more evidence that pointed tot he desire for a nuclear weapons program.

Bush was reelected in 2004, defeating John Kerry - who would wait nine years to become the Secretary of State who negotiated Sunday’s deal on behalf of the United States.

In those intervening years, Bush told Iranians in 2005 to stay home on election day rather than exercise one of the few political rights available. In the wake of low turn out, and lower expectations, Ahmadinejad became president, ushering in eight years of open hostility.

There have been cyber attacks and proxy wars; terrorism at the hands of Hezbollah - an Iranian ally and surrogate - and dead scientists in the intervening 10 years. Israel, with its own right-wing leadership and internal politics, has fueled tensions, even harming its own relationship with the Obama administration in an unsuccessful effort to keep up pressure on Iran.

When Zarif’s team first proposed a deal in 2003, Iran had not yet mastered the ability to enrich uranium - the key fuel for a nuclear bomb - to dangerous levels.

Today, Iran’s nuclear program includes a massive plutonium reactor and thousands of centrifuges enriching uranium ever nearer to bomb grade.

Sunday’s deal seeks to roll those gains back and lock down the program into a safe and verifiable place. In exchange, Iran hopes for a phased way back into the global economy - with modern airplane parts and access to long-frozen financial assets.

As important, it seeks global respect as a Middle East powerhouse with political and religious influence stretching across the region and oil production to sustain it.

Obama and Rouhani must sell this deal at home, and it will tough for both. The American public still carries the scars of a lengthy hostage crisis that followed Iran’s political and religious revolution and are reluctant to trust a new and possibly vulnerable leadership. Rouhani is under pressure from those very same revolutionary guards who see Washington as the root of Iran’s corrupt past.

Failure going forward would certainly embolden the hardliners on all sides, and push toward conflict, not resolution.

But if the deal sticks – a big if – Rouhani will be the first Iranian leader in more than 30 years who unclenched his fist - delivering his people back into the global fold. Obama may well be remembered as the Nobel laureate who removed the threat of nuclear war through the promise of extending his hand.