Ebrahim Asgharzadeh’s plan to take over the US embassy in Tehran on Sunday 4 November 1979 had been carefully choreographed. The ardent revolutionary, a bright student in his early 20s, had been careful to confide in just four other student leaders. One, a young man with the long hair and beard of a Latin American student leader, was called Mahmoud Ahmadinejad. Although Ahmadinejad – who later become Iran’s most controversial president – opposed Asgharzadeh’s idea, none of the quartet betrayed his confidence, and his plot went ahead.

Inside the embassy’s well-guarded compound in central Tehran, a 36-year-old American diplomat, fluent in Farsi and with a passion for Persian poetry, was working in his consular office. From his desk, John Limbert could hear the students chanting “Death to America” in the street outside. But he was not nervous, assuming it was just another revolutionary rally.

By 10.30am he realised how wrong he was, as he stood next to weeping, shaking colleagues just behind the two-floor building’s main door. Outside, the students had climbed up the gate and broken into the mission. Now they were shattering the basement windows and climbing inside.

Despite fearing for his life, Limbert volunteered to speak to the crowds. Stepping out, with the door locking behind him, he shook hands with members of the crowd, before asking them to leave the embassy. Desperately ad-libbing, he told them Ayatollah Ruhollah Khomeini, the founder of the revolution, had dispatched guards to disperse them.

But within seconds Limbert was blindfolded, and his colleagues were brought out beside him. One of the defining moments of modern Iranian history had begun; the US hostage crisis in which 52 diplomats were held captive for 444 days.

Since that day three decades have passed. Asgharzadeh and Limbert’s lives are very different. That young revolutionary is now a reformist, and in the intervening years has himself been imprisoned in solitary confinement for a month by the establishment. The former diplomat, meanwhile, became a senior Obama administration official advising on Iran, and is now retired. But despite their different experiences, they have one thing in common: both support the controversial nuclear agreement struck in Vienna in July, which is bringing Iran in from the cold and polarising opinions in the US.

It is hard to overestimate the shadow that the hostage crises cast over the two countries – and over relations between them. But over the phone from Iran, Asgharzadeh tells me it is time to finally time for both sides to lay the past to rest. “We took the Americans hostage for 14 months, but then we became hostages of that incident for 35 years,” he says. “We should put the history behind us and we should not let our future be taken hostage by our past.”

John Limbert (centre) and his fellow hostages after their release. Photograph: Mark Meyer/ Life/Getty

Surprisingly, Limbert agrees that it’s time to change the conversation, but thinks that can only be done if Iran changes its attitude. “The hostage crisis shaped the relationship between our countries,” he says. “If you listen to the debate over the nuclear deal, the events of 1979 are very much in the background, and it doesn’t help that the Islamic republic has never acknowledged what happened.”

At the time of the revolution, anti-American sentiments were running high in Iran. The 1953 CIA-engineered coup that overthrew Iran’s first democractically elected prime minister, Mohammad Mosaddegh, was still fresh in Iranian minds; the reinstatement of the Shah had as big an impact on the Iranian psyche as the hostage-taking would later have on the US. In the meantime, the US’s unwavering support for the Shah’s brutal regime had stoked this animosity. And when former US president Jimmy Carter’s decided – a few weeks prior to the hostage crisis – to welcome the ousted Mohammad Reza Pahlavi on to American soil, many Iranians saw it as rubbing salt into the wound.

Asgharzadeh had planned to occupy the embassy, but a long-term hostage situation was never part of the plan. Inspired by similar occupying movements in 1970s, he chose the date to coincide with the anniversary of a bloody crackdown at the hands of the Shah’s military the year before, and with a planned student rally. The idea was to divert this protest towards the US embassy, where unarmed students would overrun it and take diplomats prisoner, in what they thought would a symbolic act lasting no longer than 48 hours.

Blindfolding the American hostages, Asgharzadeh later admitted, was their first mistake – it immediately turned an occupying campaign into what looked like deliberate kidnapping. Although keen to make a global impact, Asgharzadeh never imagined his actions would spark a Tehran-Washington cold war.

Today, however, Asgharzadeh is unrepentant. Indeed, to be otherwise would be crossing a red line in Iran, where the storming of the embassy is seen as part of the revolution’s founding mythology. But he has been through a revolution in his own thinking, moving away from his student ideals to become an ardent reformist; he has spent time in jail for these views.

“Our generation had a radical and hardline view of America’s role,” he says today. “We were influenced by the trauma and nightmares of the 1953 coup. America’s inteference was against our national interest. That incident belonged to a particular time – of cold war. The world was polarised; the US government was clearly supportive of dictatorships and military regimes, and people living in third-world countries had an unpleasant image of America in their minds.”

The incident had the power to fell two administrations. In Iran, the entire cabinet of the newly appointed first post-revolution prime minister, Mehdi Bazargan – a tie-wearing moderate – resigned. While in Washington, the Carter administration was forced out when Ronald Reagan secured the release of the diplomats.

The takeover was student-engineered, but several days later, after the popular support for it became clear, it was sanctioned by the Islamic republic, who eventually took over the decision-making. As the crises wore on, Asgharzadeh himself lost interest, turning his attention to marrying a young woman he had met during the hostage-taking. But the event turned the students into heroes – especially when they said they had found evidence of espionage in the embassy compound by piecing together shredded documents the diplomats had tried to destroy.

Meanwhile, the hostage’s families held vigils in the US and put up yellow ribbons, praying for their freedom. In April 1980, the US conducted the failed Operation Eagle Claw in an attempt to rescue the hostages. Eight servicemen died, complicating matters further.

Ebrahim Asgharzadeh in 2005, by then a pro-reform politician Photograph: Atta Kenare/AFP/Getty

There is even an argument between the two sides over how the hostages were treated. In Iran the hostages are often referred to as “our guests”, with the implication they were treated with hospitality. But Limbert says he was subjected to mock executions, and was only allowed out for fresh air a few times in 14 months.

Today Limbert says that while there was mistrust on both sides, to his ears Asgharzadeh is trying to justify the unjustifiable. “You can’t undo what happened,” Limbert says. “But the first step in dealing with this is to at least acknowledge that it happened, and then [to not] fool yourself and admit this was a shameful and ugly action.”

The former hostage says this attitude is still prevalent among Iranian officials. “I get a little sad,” he says. “OK, if you were a twentysomething student, maybe you can think like that, but after 35 years, someone who is older, probably a grandparent – you would hope that they would see things in a more realistic way.”

The Americans’ release from Iran was not an end to hostility, but merely a beginning. In the eight-year war with Iraq that followed, the US supported Saddam Hussein, turning a blind eye to his use of chemical weapons. In July 1988, the US missile cruiser USS Vincennes shot down an Iranian passenger plane in the Persian Gulf, killing all 290 on board, including 66 children.

The US has never apologised. Iran, in return, stepped up its rhetoric against the US, holding annual anti-American rallies at which “Death to America” was chanted and people set fire to the US flag. America became known as “the Great Satan”, while the former embassy compound became a museum called “the den of spies” – in reference to the documents taken as evidence of US sabotage during the revolution.

“Each side has its grievances,” Limbert says, “but certainly, if you ask today, nobody is going to say that shooting down the passenger plane was a good thing.”

Limbert says the US has made efforts, including those by former secretary of state, Madeleine Albright, to acknowledge the 1953 coup; Barack Obama has spoken about it too. He complains that this is in stark contrast to the way the hostage crises has been commemorated. “No one pretends that it didn’t happen. We don’t mark it with celebrations, we don’t issue stamps about it,” he points out.

Despite the trauma he faced, Limbert, who has an Iranian wife, has never cut his ties with the country. Every summer, around this time of the year, Limbert goes to a sour cherry orchard near his house in Virginia to make jam, a Persian tradition. He has written books about Iran, including one about Shiraz, the city of love and poetry, named “Shiraz in the Age of Hafez: The Glory of a Medieval Persian City”. Asgharzadeh says this has given him a real respect for the man he once took captive: “John Limbert is a very positive figure in the US. He is a friend of Iranian culture. If the US has hundreds of John Limberts, it will only be a good thing.”

John Limbert (right) on Capitol Hill in 2013, calling for greater US-Iranian diplomacy. Photograph: Jonathan Ernst/Reuters/Corbis

In 2009, when the re-election of Mahmoud Ahmadinejad sparked unrest in Iran, Limbert, who had retired in 2006, began working for the state department. Just 10 months later he decided to step aside, because “there wasn’t much sign of progress, and frankly, at that time, the relationship wasn’t going anywhere. I was hoping something would break. The timing you can never predict – it shouldn’t have taken 35 years.”

It was the election of the reformist Hassan Rouhani in 2013 that changed everything. “He became president with a mandate to help the economy, to bring Iran out of its isolation, and to all appearances in doing this he had the backing and the confidence of the supreme leader [Ayatollah Ali Khamenei],” Limbert says.

Rouhani’s mandate was a continuation of the work of the former president Mohammad Khatami, who came to power in 1997. Asgharzadeh, along with other hostage-takers, was supportive of Rouhani, and he later became a reformist MP; Massoumeh Ebtekar, who achieved fame as “Mary” during the hostage crisis, during which she served as the students’ English-language spokeswoman, is Iran’s current vice-president under Rouhani. In 2011, when a hardline mob stormed the British embassy in Tehran, Asgharzadeh condemned the move as “an ugly act and a caricature” of the 1979 incident.

Rouhani’s election sparked the first direct contact between an Iranian president and his US counterpart in more than three decades. The thawing of relations made the deal between Iran and the world’s six major powers over Iran’s nucelar programme, possible – but fears remain that hardliners in Tehran and Washington, especially in the US congress, could jeopardise it before it is fully enacted.

Congress is working hard to vote it down. Obama has vowed to veto a disapproval and even some ranking Democracts have joined opposition. This, says Limbert, is partly because of the unresolved issue of the hostage crises. “As long as our Iranian friends don’t come to terms with those events, you are going to hear the kind of debate that we’re hearing now. Basically, people are saying that you can’t make any agreement with what they call ‘those’ people.”

But Asgharzadeh is optmistic that this is changing, “In Iran, people are beginning to have a more realistic image of the west, and of the US in particular. I look at the nuclear deal as more than just an agreement. It will have bigger impacts on Iran relations with the western world. Taboos have been broken.”

Limbert agrees: “It isn’t that US and Iran are friends, but at least we have the possibility of using diplomacy, rather than just shouting at each other.”

Would both men like to see a day when embassies reopen in Tehran and Washington? “Don’t ask me to predict that,” Limbert chuckles. “Before there is, there might be some American personnel in an interest section [a de facto embassy] – that would be the first step.”

Asgharzadeh says: “My wish is that Iran-west ties become normalised, and American and Iranian embassies reopen in a situation so it will not have to close again.”