The rally for Hassan Rouhani at the Shobada Centre in Imam Khomeini Square was vibrant. There were banners and placards, songs and chants in a show of passionate belief that the President must be allowed to finish his mission to bring about an open, free and prosperous society.

The presidential election campaign in Iran is tense and the outcome increasingly tight. Mr Rouhani’s hardline opponent is making gains. The great fear of the liberals is that Ebrahim Raisi, once a judge in the “death commissions” which sent thousands of political prisoners to the gallows and firing squads, may win. And, with that, the country would slide back into harsh theocratic rule at home and isolation abroad.

The man who may help bring this about is Donald Trump, whose baleful shadow hangs over this vitally important election. The US President has threatened to tear up the nuclear deal under which Iran has begun to be free of crippling punitive sanctions, and started to re-establish relations with the international community.

This plays into the hands of the reactionaries here who have always held that the West, and America in particular, cannot be trusted. President Rouhani, they charge, has been naïve and irresponsible and betrayed the security of the nation with an agreement which was going to fail.

Since his unexpected victory last November, Mr Trump had softened his stance on a number of issues. He says he no longer feels Nato is useless; he no longer says China is a currency manipulator; he is no longer threatening to pull US forces out of Japan and South Korea or to pull America out of the North American Free Trade Agreement unless Canada and Mexico acquiesce to his demands.

But the US President continues to be overtly hostile on Iran. During the election campaign he declared that the nuclear agreement -- widely viewed by other Western states including Britain as a landmark achievement -- was “the worst deal in history” and that he would “dismantle this disastrous mistake”.

Since then the Trump administration has sent dangerous mixed signals based, at times, on false assertions. Secretary of State Rex Tillerson grudgingly acknowledged to Congress that Tehran was fulfilling its obligations under the agreement, But then, at a press conference, he claimed that the deal “fails to achieve the objective of a non-nuclear Iran” and only “delays their goal of becoming a nuclear state”. He broadened his attack: “I would like to address Iran’s alarming and ongoing provocations that export terror and violence, destabilising more than one country at a time.”

Mr Trump, who appointed Mr Tillerson as the Iran pointman, has charged that the Iranians “are not living up to the spirit of the agreement” while failing to explain what this actually means. His administration, he says, is carrying out a “comprehensive review of Iran policy”.

Mr Raisi’s campaign received a boost on Monday when Mohammed Baghar Ghalibaf, the hardline mayor of Tehran, a former police chief, dropped out as candidate, saying: “I call upon all my supporters across the country to come out in support of my esteemed brother Ebrahim Raisi and make him succeed in forming the government of work and dignity.”

Mr Trump will meanwhile be embarking on Friday on his first presidential foreign trip, taking him to Saudi Arabia and Israel, two states which view Iran as the enemy. Israel considers Tehran as an existential threat and the Sunni Saudis are fighting proxy wars against Shia Iran across the region, including in Yemen where the Saudis are carrying out a devastating bombing campaign in which thousands have been killed and schools and hospitals destroyed.

Belligerent statements by Mr Trump on his trip about the nuclear deal and sanctions, egged on by his hosts, cannot fail to have an impact on voting in Iran. There is already frustration that the nuclear agreement has not been followed by the expected quick economic gains. This is partly due to wariness of international banks of possible American sanctions if they work with Iran. The effect on the ground is reflected on opinion polls showing the number of those who “strongly approved” of the deal has fallen from 43 per cent two years ago to 21 per cent; although those who “somewhat approved” have remained the same at 33 per cent.

The conservatives have seized on this issue. Mr Raisi pointed out in a televised debate that “Mr Rouhani promised all sanctions will be lifted after Barjam [the Persian term for the agreement] but where was change on peoples’ tables? Did it solve the issue of recession and unemployment?” Mr Qalibaf added in his criticism “a tree that has not borne any fruit for four years will not yield anything positive in the future”.

Majid Jafarzadeh Najar, an adviser to Mr Raisi, said: “Given the choice between Hillary Clinton and Donald Trump, I would take Donald Trump, at least with him you know what you are getting. But really it is about US policy towards Iran, we don’t think they will ever keep their word. America had a lot of influence over this country when it was under the Shah and they have never forgiven us for getting rid of him.

Donald Trump's first 100 days: in cartoons Show all 33 1 /33 Donald Trump's first 100 days: in cartoons Donald Trump's first 100 days: in cartoons Donald Trump's first 100 days in office were marred by a string of scandals, many of which caught the eye of the Independent's cartoonists Donald Trump's first 100 days: in cartoons Trump's first 100 days have seen him aggressively ramp up tensions with his nuclear rivals in North Korea Donald Trump's first 100 days: in cartoons Mr Trump has warned of a "major, major conflict" with the pariah nation lead by Kim Jong Un Donald Trump's first 100 days: in cartoons Mr Trump dropped the "mother of all bombs" on alleged ISIS-linked militants in Afghanistan, amid an escalation of US military intervention around the globe Donald Trump's first 100 days: in cartoons Mr Trump has been accused of falling short of the standards set by his predecessors in the Oval Office, including Franklin D Roosevelt Donald Trump's first 100 days: in cartoons The tycoon's ascension to the White House came at a time when the balance of power is shifting away from Western nations like those in the G7 group Donald Trump's first 100 days: in cartoons Western politicians, including the British Conservative party, have been accused of falling in line behind Mr Trump's proposals Donald Trump's first 100 days: in cartoons Brexit is seen to have weakened Britain, reducing still further any political will to resist American leadership Donald Trump's first 100 days: in cartoons Mr Trump's leadership has been marked by sudden and unexpected shifts in global policy Donald Trump's first 100 days: in cartoons Trump's controversial missile strike on Syria, which killed several citizens, was seen by some analysts as an attempt to distract from his policy elsewhere Donald Trump's first 100 days: in cartoons The President has also spent a large majority of his weekends golfing, rather than attending to matters of state Donald Trump's first 100 days: in cartoons Though free of gaffes, a visit from Chinese president Xi Jinping spotlighted trade tensions between the two states Donald Trump's first 100 days: in cartoons One major and unexpected setback came when Mr Trump's Healthcare Bill was struck down by members of his own party Donald Trump's first 100 days: in cartoons Mr Trump has been a figure of fun in the media, with his approval at record lows Donald Trump's first 100 days: in cartoons A string of revelations about Mr Trump's financial indiscretions did not mar his surge to the White House Donald Trump's first 100 days: in cartoons Outgoing President Barack Obama was accused of wiretapping Trump Tower by his successor in America's highest office Donald Trump's first 100 days: in cartoons The alleged involvement of Russian intelligence operatives in securing Mr Trump the presidency prompted harsh criticism Donald Trump's first 100 days: in cartoons The explosive resignation of Security Adviser Michael Flynn, who lied about his links to the Russian ambassador, was just one scandal to hit the President Donald Trump's first 100 days: in cartoons Many scandals, such as the accusation Barack Obama was implicated in phone-hacking, first broke on Mr Trump's Twitter feed Donald Trump's first 100 days: in cartoons Donald Trump's election provoked mass protests in the UK, with millions signing a petition to ban him from the country Donald Trump's first 100 days: in cartoons Donald Trump cited a non-existent terror attack in Sweden during a campaign rally Donald Trump's first 100 days: in cartoons Donald Trump stands accused of stoking regional tensions in Eastern Asia Donald Trump's first 100 days: in cartoons North Korea has launched a number of failed nuclear tests since Mr Trump took power Donald Trump's first 100 days: in cartoons Theresa May formally rejected the petition calling for Mr Trump to be banned from the UK Donald Trump's first 100 days: in cartoons When Mr Trump's initial so-called Muslim ban was struck down by a federal justice, the President mocked the 69-year-old as a "ridiculous", "so-called judge" Donald Trump's first 100 days: in cartoons A week after his inauguration, Theresa May met with Mr Trump at the White House Donald Trump's first 100 days: in cartoons Donald Trump's first days in office were marked by a hasty attempt to follow through on many of his campaign promises, including the so-called Muslim ban Donald Trump's first 100 days: in cartoons Donald Trump's decision to ban citizens of many majority-Muslim countries from the US sparked mass protests Donald Trump's first 100 days: in cartoons Revelations about Donald Trump's sexual improprieties were not enough to keep him from being elected President Donald Trump's first 100 days: in cartoons British PM Theresa May was criticised by many in the press for cosying up to the new President Donald Trump's first 100 days: in cartoons One of Mr Trump's top aides, Kelly Anne Conway, was mocked for describing mistruths as "alternative facts" Donald Trump's first 100 days: in cartoons British PM Theresa May was quick to demonstrate that her political aims did not hugely differ from Mr Trump's Donald Trump's first 100 days: in cartoons Donald Trump's inauguration, on 20 January 2017, sparked protests both at home and abroad

“The mistake Mr Rouhani made was making promises to the people about how good the economy was going to be after the nuclear agreement. And this did not happen. We don’t think Trump can tear up the agreement by himself even if he wants to, because there are other international states involved. But we think he will slow down the lifting of sanctions and cause other problems.”

Mr Rouhani’s supporters are hoping that an expected withdrawal from the race of Eshaq Jahangari, the vice-president, who is a liberal, will add to the President’s votes and calm the jitters.

Many are aware of the pitfalls of the nuclear deal and the Trump effect. “I think Trump is a radical, an extremist, and what he is saying and doing is frightening. We are very surprised that the Americans elected someone like him, I do not know what it shows about America,” was the view of Siavash Sharivar, a civic society worker who has been helping the Rouhani campaign, speaking at the rally for the President in Shobada Centre.

Russia and Iran have threatened the US over Syria

“The Iranian public is cultured and civilised and we want to live in cooperation with the rest of the world. Most people support the agreement, and political figures in Iran would be wrong to use Trump to weaken it. Mr Rouhani is a pioneer; this agreement is good for Iran and it is good for the world.”

The rally was one of solidarity and celebration rather than aggressive political drumbeating. Around three-quarters of those present were young and half of these were women. An orchestra, a fusion of East and West, with violins and cellos alongside Iranian string instruments like the setar and tanburs, played traditional and modern music.