Malcolm Byrne directs the Iran-U.S. Relations Project at the nongovernmental National Security Archive at George Washington University. These views are his own.

Ignorance of the history of U.S.-Iran relations is leading the Trump administration toward irreversible mistakes on the Iran deal. (AP Photo/Evan Vucci)

In disavowing — but not entirely scrapping — the Iran nuclear agreement on Friday, President Trump dredged up some dark memories from America’s troubled relationship with the Islamic Republic, starting with the infamous 444-day hostage crisis of 1979-1981. His aim was to paint Tehran as a historically bad actor, undeserving of the deal it got. An easy target, no doubt.

But the president missed the real takeaway from his stroll through history. Precisely because the relationship has been so bitter, getting a major deal of any kind with Tehran — even one as unsatisfying as the Joint Comprehensive Plan of Action (JCPOA) — was a remarkable feat that is unlikely to be replicated. This is the reality of the deal that Trump and other critics simply haven’t grasped — and why they’re on track to make a major, perhaps irreversible, mistake in U.S.-Iran relations.

For decades, U.S.-Iran relations have been characterized by dueling grievances. For the United States, as Trump indicated last week, the outrages began with the Islamic revolution of 1979, when a “fanatical regime … seized power,” “raided the wealth of one of the world’s oldest and most vibrant nations,” then “spread death, destruction, and chaos all around the globe.”

At the top of the list of injuries was the seizure of the American Embassy in Tehran along with several dozen hostages nine months after the revolution. Other major episodes have included numerous bombings, notably of the Marine barracks in Beirut in 1983 and Khobar Towers in Saudi Arabia in 1996, both attributed to Tehran.

Trump’s language is especially strident but encapsulates how most Americans envision the Islamic Republic — a rogue, not to say irrational, sponsor of international terrorism out to wreak havoc on the international order, with the United States and Israel as special targets.

For the Islamic Republic, however, the list of grievances begins in 1953 when the United States and Britain helped oust then-Prime Minister Mohammed Mossadegh, a hero of the oil nationalization movement. Even for many Iranians outside government, this was a defining moment of Great Power interference. Some of the perpetrators of the 1979 U.S. Embassy seizure even invoked the coup as a justification for the takeover, defending it as a way to stave off a similar assault on the sovereignty of the nascent Islamic Republic. Twenty-five years of U.S. backing for the shah’s increasingly brutal regime added to the resentment.

Since the revolution, the ingrained perception of the United States as an arrogant neocolonial bully bent on overthrowing Islamic rule in Iran has been sharpened by other experiences, none more stinging than the Iran-Iraq war of the 1980s. Iranians seethed at the support Western powers gave Iraq, with the United States receiving special opprobrium (even though Iran’s charges that the United States provided arms and chemical weapons to Saddam Hussein were never substantiated).

Following direct military clashes with U.S. forces in the Persian Gulf (after Iranian mines damaged American ships), the nadir of relations between the two countries came in 1988 when a U.S. Navy cruiser mistakenly shot down a civilian Iranian airliner, killing 290 passengers and crew. So high was the level of distrust by then that Iranian officials assumed the attack was deliberate — a misperception reinforced by the Navy’s jarring decision a year later to decorate the ship’s captain at the end of his tour.

Even those grievances that stem from contested events have become so rooted in the minds of officials and citizens in each country that perception might as well be reality. Taken together with each side’s deeply incompatible sense of mission — America’s self-appointed role as global leader versus the divinely ordained Islamic revolution — small wonder that the public face of the relationship has been so punctuated by provocative stunts, bombastic rhetoric and reflexive demonization.

And yet, the full story of U.S.-Iran relations has been far more nuanced. For one thing, much of Iran’s population has always been infatuated with the United States — something Americans rarely encounter abroad anymore. Many Iranians have relatives and friends living in the United States and are more able to interact with the outside world than many Americans assume. American visitors to the Islamic Republic typically come back with stories of being invited off the streets to people’s homes for dinner simply because they are American, and being implored to ignore hollow regime calls for “Death to America” and the occasional ritual torching of the Stars and Stripes.

On closer inspection, the attitudes of many Iranian officials are also more complex than expected. Every American and Iranian leader since the 1979 revolution has quietly either sought or consented to exploring diplomatic contacts between the two nations. From Ronald Reagan’s zany covert arms-for-hostages scheme to Barack Obama’s public calls for dialogue, real possibilities have opened up for reducing tensions and even expanding ties.

Prior to Obama, the high points in this sotto voce history came first through contacts between the reformist Mohammad Khatami and Bill Clinton, and then in the immediate post-9/11 era when representatives from both countries fleetingly collaborated on the rebuilding of Afghanistan’s government.

Invariably, however, political and structural obstacles to better relations have materialized. Vocal hard-liners in both countries routinely knee-cap their own governments’ policies. In an area so steeped in emotion, domestic politics have usually affected the outcome. Complicating matters for more moderate Iranian officials has been the fact that hard-liners dominate key institutions from the supreme leader to the Revolutionary Guard Corps.

Mutual suspicions, deep-seated ignorance of the adversary and plain bad timing have consistently tripped up efforts to improve ties. That is, until 2013 when Presidents Obama and Hassan Rouhani committed their personal prestige to achieving a nuclear agreement.

Two years later, their negotiators, along with those from the P5+1 states, succeeded because each side operated on the basis of mutual respect, realistic expectations, confidence in the intentions of their counterparts and their shared desire for a reasonable deal. The knowledge that they had the backing of their leadership likewise empowered the negotiators. Also key was an explicit understanding going back to the late George W. Bush years that regime change was off the table.

Although senior American negotiators insist the talks were never about trust — hence the number of safeguards they built in — credibility and confidence-building were crucial. The night-and-day difference when Rouhani’s team, headed by Foreign Minister Mohammad Javad Zarif, replaced negotiators from the previous hard-line administration attests to that.

Therein lies the problem with the Trump administration’s scenario for reworking the Joint Comprehensive Plan of Action (JCPOA), as the Iran nuclear deal is official known. Since Trump sees this largely as a domestic political issue, all-important foreign policy and technical considerations are being ignored. Take the simple matter of diplomatic tact. Anyone who has dealt with Tehran can testify to the central importance of the concept of mutual respect. Trump’s speechifying may gratify his base, but it has also already unnecessarily contaminated the ground for any future talks. (So did Secretary of State Rex Tillerson’s implied endorsement of regime change back in June.)

More substantively, the consensus of Washington’s European allies who are party to the JCPOA is that the Islamic Republic will reject additional restrictions as unreasonable. For instance, if the United States hopes to incorporate ballistic missiles and regional behavior into the talks — much as those are concerns in the West — it will rightly be seen as dismantling the original framework, which was kept intentionally narrow to enable a deal.

These sorts of maneuvers will strengthen the contention maintained by Iran’s hard-liners, including the supreme leader, that Washington is not serious about a fair agreement, and that it is in Iran’s interest to resist, if not pull out altogether.

Rouhani’s stock at home has shrunk steadily as the mixed realities of the nuclear deal for the Islamic Republic have sunk in. The Trump administration’s stated intentions and provocative language have already made things worse by, first, stripping away the mutual confidence and shared sense of purpose that the JCPOA’s participants labored for and, second, giving the regime an excuse to circle the wagons in the face of renewed “proof” of American bad intentions.

By making it nearly impossible for Ayatollah Ali Khamenei and other conservatives to back a new round of talks, even if they were so inclined, the Trump administration has likely rendered any chance of improving the Iran deal a fantasy.