Iran and what we would once have called the great powers – the five permanent members of the UN security council plus Germany – have been engaged in negotiations over the Iranian nuclear programme for well over a decade now. At times the US has been directly involved, and at other less friendly times, indirectly – but never in the years since, to great alarm if not outright panic, the world discovered that Iran possessed a nuclear programme have we been as close to resolving its fate as we are now.

The reasons are myriad; certainly primary among them is the election of a pragmatist US president in 2008, one who, unlike his we-don’t-talk-to-evil predecessor, promised to engage directly with Iran on its nuclear program as well as on other issues of contention between the two countries, and the election of an Iranian president in 2013 who, unlike his predecessor, promised to pursue a “win-win” solution to the crisis. There are other reasons long debated in foreign policy circles. None of them, however, correctly stated or not, are important now.

What is important is to recognise that with only days left to reach a comprehensive agreement – one that would satisfy the minimum requirements of the US and Iran (and the truth is that it is only theirs that matter, despite the presence of other powers at the table) – there may not be another opportunity for a generation. This is the diplomatic perfect storm, if you will, to begin the process of US-Iranian reconciliation.

Such a reconciliation would entail a realignment of western interests – many shared with Iran – in the region that is far more important than numbers of centrifuges, kilograms of enriched uranium, months to theoretical “breakout”, or years that a deal will be in effect, that appear to be the last stumbling blocks. Those are technical issues that may be difficult, but not impossible, to resolve before 24 November. What has taken years – 35-plus to be precise – for many Americans to understand is the motivations behind Iran’s Islamic revolution. And it is these motivations which are behind what appears to be, if for peaceful purposes, an illogical nuclear ambition.

Beyond building the world’s first modern theocracy, which some revolutionaries and perhaps a large percentage of the then silent population never bargained for, the revolution was as much about Persian dignity and greatness as it was about overthrowing a despotic monarchy. It isn’t just pride, as some suggest, that governs popular support for the nuclear programme (or any other technical accomplishment), although Iranians are proud – perhaps overly so – of their 5,000-year history and culture, and can be accused of faith in Persian exceptionalism in much the same way the US has in its own.

It’s certainly a belief in exceptionalism, sometimes with racist undertones, that has rubbed Iran’s neighbours up the wrong way for centuries – far more so than the greatly debated Sunni-Shia divide – which partly explains why many Iranians, even those opposed to the Islamic system, are quick to ask that if lowly Pakistan and western-supported Israel can have nuclear weapons, why shouldn’t Iran have at least its own nuclear energy? Indeed, pride and a sense of exceptionalism can explain some Iranian behaviour, but more than anything it is dignity that drives the Islamic Republic’s foreign policy; a restored dignity that was promised its people in the revolution of 1979.

After at least a century of being dictated to by foreign powers, in 1979 the people of a once-great nation – arguably the world’s first multi-ethnic state – chose dignity over subservience, whatever the cost. It didn’t matter that the shah and his father before him had wrested, by force, their nation out of its 19th-century stupor and into a 20th-century modern state. What mattered was that they, and particularly the younger shah, had done so at the cost of their dignity. In the waning years of the second world war, the great powers had removed occupied Iran’s first Pahlavi king and replaced him with his unprepared 21-year-old son; it was decided at the Tehran conference in late 1943, attended by Roosevelt, Stalin and Churchill – who couldn’t even be bothered to pay a courtesy call to the monarch he helped install, the self-proclaimed “king of kings” and “light of the Aryans”. Iran’s independence was guaranteed, but in the minds of most Iranians nothing could be as humiliating as having their fate decided by three farangis, or foreign powers. The 1953 CIA- and MI6-backed coup against the democratically elected prime minister Mohammad Mossadegh only confirmed their sense of helplessness. The Islamic revolution put an end to that notion – Iran was never again to play a subservient role, in the region or in the world.

It has, over the years, paid a great price to maintain that one aspect of its revolution that still resonates with its populace – for both Islamic and republic aspects have been in question to many, if not from the regime’s birth then certainly since the “green” uprising of 2009. It is therefore unlikely that those who control power in Iran, whether conservative, moderate or reform leaning, will surrender the nation’s dignity, along with the vestiges of their own legitimacy, by accepting the dictates of western powers. No: any deal, nuclear or otherwise, will have to take that into account, and it is not a matter of allowing Iran a “face-saving” deal but affording it and its people the dignity they believe they deserve.

My own father, a supporter of Mossadeq who subsequently served the shah as a diplomat and a fan of all things American, only ever railed against the king – in private, of course – when he felt Iran’s dignity had been surrendered to the west, over matters both momentous and trivial. Late in his life, in exile in Britain and having been deprived of his Persian dignity by the revolution that discarded him, he said to me of the nuclear talks that were seemingly stalled forever that the Americans “harf-e zoor meezanan”, which translates roughly as the US “is talking with the language of imposition”. While on an extended stay in Tehran in the last years of Mahmoud Ahmadinejad’s presidency I heard my optician, ever cynical about the Islamic system, use exactly the same phrase when we discussed the nuclear crisis. Few Iranians, regime supporters or not, would willingly surrender to “harf-e zoor”, the “language of force” or “an unfair demand”.

For all this, it isn’t hard to imagine a nuclear deal. Iranians recognise that they can compromise without loss of dignity, and the US recognises it must make concessions which, while seeming to be appeasement by some, in fact make no real difference to whether Iran can rush to a bomb or not. It is also not hard to predict the effects of a deal and the subsequent normalisation on Iranian people. For more than 35 years they have yearned for an end of isolation and ostracisation by the west – some of it their leaders’ fault – and are as hungry as a people can be for interaction – business, social and cultural – with the farang.

Iranians have long looked to the Persian Gulf (and to Turkey) with some indignation. If it were not for the animosity with the west, Tehran would be a destination far more attractive to business than Dubai, they believe, and Isfahan to travellers than Istanbul. In an irony or ironies, Iran is also now, to quote Jimmy Carter from a different time, “an island of stability in one of the more troubled areas of the world”. Iranians look around them and don’t like what they see: revolution, unrest and civil war are not for them, but progress – social, political and technological – and healthy relations with the international community are.

Iranians, especially the young, the vast majority highly educated but whose prospects are bleak, have been patiently waiting for this day – promised by a president they elected a year-and-a-half ago. They have no doubt that happier times await them if the west engages Iran in détente, if not an entente cordiale. A nuclear deal, if it comes on 24 November, will bring dancing in the streets – forbidden by law – and many toasts – forbidden but enjoyed behind Persian walls – and dignity. On that day the authorities – themselves with smiles on their faces – will surely turn a blind eye.