Two years later, it has few friends in the Donald Trump administration or in Tehran.
When it was signed in Vienna, President Barack Obama and his secretary of state, John Kerry, claimed the pact -- commonly known as JCPOA, for Joint Comprehensive Plan of Action -- as an undeniable success.
Their Iranian counterparts, President Hassan Rouhani and Foreign Minister Mohammad Javad Zarif, were equally ebullient.
The pact was also signed by China, Russia, France, Britain and Germany, lending it additional weight.
In force since January 16, 2016, the JCPOA provides for international monitoring of Tehran's nuclear program to ensure its purely peaceful, civilian use.
In exchange, Tehran was promised the gradual lifting of the international sanctions that have strangled the Iranian economy for years.
But during his presidential campaign, billionaire Republican Donald Trump made the accord a favorite target. In campaign speech after campaign speech, he pronounced it "the worst deal ever," and he vowed, if elected, to "rip it up."
As president, however, Donald Trump has not carried out his threat.
In May, the Donald Trump administration even decided to pursue the Obama policy of easing some sanctions at least while completing a JCPOA review to decide -- in principle by Monday -- whether to continue lifting sanctions.
Obama legacy at stake
After vowing to drop out of the Paris climate agreement and questioning the Obama-era opening to Cuba, Trump would be dealing a terrible blow to his predecessor's legacy if he decided to abandon the JCPOA.
The former real estate mogul has already staked out contrary positions to Obama in the Middle East, tightening US ties to Saudi Arabia's Sunni leaders while calling for the "isolation" of their Shiite rivals in Iran.
Washington accuses Tehran of posing a regional "threat" that "destabilizes" Syria, Iraq, Yemen and Lebanon, either directly or through its "terrorist" proxies.
The Republican-controlled US Senate passed a bill in June to impose new sanctions on Tehran for its "support for international terrorism." Meantime, the State Department, which since 1984 has declared Iran a "state sponsor of terror," continues to punish Tehran for its ballistic missile program.
The JCPOA nonetheless still has its fervent supporters in Washington.
'An existential threat'
The accord "removed an existential threat to the United States and our allies and partners," said a statement from Diplomacy Works, a pressure group founded by John Kerry and some former advisers.
The lobbying group added, "We encourage the administration to recertify Iran's compliance -- which they must do in order to reissue sanctions waivers due Monday."
As Jonathan Finer, a former Kerry chief of staff, told AFP, "The nuclear agreement is working... It would be hard to understand why the administration would want to generate a crisis" by tearing up the accord.
In a letter to Donald Trump, 38 retired US generals and admirals stressed that the agreement had "successfully blocked Iran's paths to a nuclear weapon."
"Iran dismantled two-thirds of its centrifuges, gave up 98 percent of its stockpile of sensitive uranium and poured concrete into the core of its heavy-water reactor," the retired officers wrote.
In fact, the UN nuclear monitoring authority, the International Atomic Energy Agency (IAEA), praised Iran last month for respecting its commitments.
Europeans are deeply concerned, however, about the path Trump might take.
"What we are telling the Americans is that the JCPOA is not perfect but (is) much better than other options," a senior European official told reporters, speaking on grounds of anonymity.
"Losing the JCPOA would be a mistake."
The retired officers warned against "aggressive posturing that could pave the way to war" with Iran, something that seemed a possibility in the early 2000s.
Dashed hopes in Iran
In Tehran, too, the euphoria of July 2015 has given way to disillusion.
Even if the desire for closer ties with the West remains strong among many Iranians -- as shown by the re-election in May of the moderate Rouhani -- the much-anticipated economic fruits of the nuclear deal have been slow to materialize.
The continuing American sanctions frighten bankers and scare away international corporations.
While the French oil company Total did recently sign a $4.8 billion gas deal with Iran, foreign direct investment in the country topped out last year at $3.4 billion, a very long way from the $50 billion that Rouhani once promised.
And that provides grist for ultraconservative factions in Iran hostile to America.
As the holy month of Ramadan was ending in June, and just before a speech by supreme leader Ayatollah Ali Khamenei, the official poet of the Islamic Republic proclaimed:
"Too much excitement over the JCPOA was a mistake,
Relying on Uncle Sam was a mistake,
O friends, we made a pact with a thief."