“The election foils many of the evil intentions Americans and Zionists have in mind against the country. They aim to sow discord between the Islamic establishment and the people. They will not succeed,” declared Ayatollah Sayyid Ali Khameini as the campaigning stepped up for the last days of the polls in Iran.

“As in the 11 February rallies and the funeral reception of Martyr Soleimani, enemies will not achieve their goals when people go to vote which is a religious duty and a revolutionary duty,” the Supreme Leader stressed in a rare public speech.

The killing came amid steadily rising tensions and acts of sporadic violence, including the seizure of oil tankers in the Gulf and attacks on American bases and the embassy in Iraq. There remains great concern that continuing confrontations in the region may yet spark a deadly conflict with grave consequences.

The polls in Iran will also show which direction this country of 83 million people, one of the main strategic players in the Middle East, will take in the future: whether the reformists who won the parliamentary and presidential elections just a few years ago will hang on, or whether hardliners who are inimically hostile to the west will begin the process of gaining power.

On the streets of Tehran, people insist they will not be swayed by foreign propaganda and express continuing anger at the killing of General Soleimani. But, at the same time, many also speak of their disillusionment with the government and establishment politicians – charging them with the responsibility for an economy in dire straits and widespread corruption.

The main cause of the current economic problems are the sanctions imposed by the Trump administration after it withdrew from an international agreement with Iran on its nuclear programme.

But it is the government of president Hassan Rouhani and foreign minister Mohammad Javad Zarif that signed the Joint Comprehensive Plan of Action (JCPOA), curbing nuclear powers in return for a chance to open up the country to the outside world, modernise the economy and access lucrative foreign trade.

Correspondents covering the parliamentary and presidential elections in 2016 and 2017 saw a great outpouring of optimism along with the votes for the reformists.

But now the tide appears to be turning against them. The conservatives – or principalists as they term themselves – who were against the deal had repeatedly warned that one cannot trust the west. Now they can proclaim that they had been right all along and those responsible for the agreement must be thrown out of office.

“The Americans abandoned the nuclear deal and the Europeans have not done enough to protect it,” says Kamal Sepahi, a conservative commentator. “But it is Rouhani and Zarif who believed the Americans and the Europeans.

“The reformists went for the deal and that failed. Rouhani is one of the owners of the policy which failed and so is Zarif, so yes, people will think they are responsible.”

Protests in Iran over downing of plane and tensions with the west Show all 23 1 /23 Protests in Iran over downing of plane and tensions with the west Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranian police officers take position while protesters gather in front of Amir Kabir University AP Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranians demonstrate following a tribute for the victims of the Ukraine Boeing 737 crash in front of the Amirkabir University in the capital Tehran EPA Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranian police dispersed students chanting "radical" slogans during a gathering in Tehran to honour the 176 people killed when an airliner was mistakenly shot down AFP via Getty Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University - People hold flowers as tear gas fired by police rises Online videos purported to show that Iranian security forces fired both live ammunition and tear gas to disperse demonstrators protesting against the Islamic Republic's initial denial that it shot down a Ukrainian jetliner AP Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranian police officers take position while protesters gather AP Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University AFP correspondents said hundreds of students had gathered early in the evening to pay respects to those killed in the air disaster ISNA/AFP via Getty Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranian protester prepares to throw a tear gas canister back at police AP Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University A protester confronts an Iranian police officer AP Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University epa08120223 Iranians protest to show their sympathy with victims of Ukraine International Airlines Boeing 737-800 in front of the Amir Kabir University in Tehran, Iran, 11 January 2020. Media reported that hundreds of Iranians protests in Tehran in solidarity with victims of the Ukraine plane as Iranian military released a statement claiming that Ukraine International Airlines flight PS752 was shot down due to human error. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranian police officers take position while protesters gathe AP Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranians light candles for victims EPA Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University epa08120526 Iranians protest to show their sympathy to victims of Ukraine International Airlines Boeing 737-800 in front of the Amir Kabir University in Tehran, Iran, 11 January 2020. The Iranian military released a statement on 11 January 2020 that Ukraine International Airlines flight PS752 was shot down due to 'human error.' The passemger jet en route from Tehran to Kiev crashed minutes after takeoff on 08 January 2020, all all 167 passengers and nine crew members aboard were killed. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran People burn British and Israeli flags during a protest in front of the British embassy, in Tehran. Hundreds of Iranian hardliners gathered for a protest against Britain, a day after the UK ambassador to Iran Robert Macaire was detained after attending a a vigil for the victims of Ukraine passenger jet EPA Protests in Iran over downing of plane and tensions with the west British embassy protestBritish embassy protest in Tehran Chanting "Death to Britain", up to 200 protesters rallied outside the mission a day after the brief arrest of British ambassador Rob Macaire AFP via Getty Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran epa08122502 Iranian hardliners shout slogans as they gather in front of the British embassy during an anti-Britain protest, in Tehran, Iran, 12 January 2020. According to reports, hundreds of Iranian hardliners gathered for a protest against Britain, a day after the UK ambassador to Iran Robert Macaire was detained after attending a a vigil for the victims of Ukraine passenger jet. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran Iranian demonstrators hold placards bearing the images of slain military commander Qasem Soleimani and Iran's Supreme Leader Ayatollah Ali Khamenei in front of the British embassy in the capital Tehran on January 12, 2020 following the British ambassador's arrest for allegedly attending an illegal demonstration. - Chanting "Death to Britain", up to 200 protesters rallied outside the mission a day after the brief arrest of British ambassador Rob Macaire at a memorial for those killed when a Ukraine airliner was shot down. (Photo by ATTA KENARE / AFP) (Photo by ATTA KENARE/AFP via Getty Images) ATTA KENARE AFP via Getty Images Protests in Iran over downing of plane and tensions with the west Protesters chant slogans and hold up posters of Gen. Qassem Soleimani while burning representations of British and Israeli flags, during a demonstration in front of the British Embassy in Tehran, Iran, Sunday, Jan. 12, 2020. A candlelight ceremony late Saturday in Tehran turned into a protest, with hundreds of people chanting against the country's leaders â€” including Supreme Leader Ayatollah Ali Khamenei â€” and police dispersing them with tear gas. Police briefly detained the British ambassador to Iran, Rob Macaire, who said he went to the Saturday vigil without knowing it would turn into a protest. (AP Photo/Ebrahim Noroozi) Ebrahim Noroozi AP Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran epa08122741 Iranian hardliners gather in front of the British embassy during an anti-Britain protest, in Tehran, Iran, 12 January 2020. According to reports, hundreds of Iranian hardliners gathered for a protest against Britain, a day after the UK ambassador to Iran Robert Macaire was detained after attending a a vigil for the victims of Ukraine passenger jet. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west A hardline protester holds up a placard during a demonstration in front of the British Embassy in Tehran, Iran, Sunday, Jan. 12, 2020. A candlelight ceremony late Saturday in Tehran turned into a protest, with hundreds of people chanting against the country's leaders â€” including Supreme Leader Ayatollah Ali Khamenei â€” and police dispersing them with tear gas. Police briefly detained the British ambassador to Iran, Rob Macaire, who said he went to the Saturday vigil without knowing it would turn into a protest. (AP Photo/Ebrahim Noroozi) Ebrahim Noroozi AP Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran epa08122743 Iranian hardliners gather in front of the British embassy during an anti-Britain protest, in Tehran, Iran, 12 January 2020. According to reports, hundreds of Iranian hardliners gathered for a protest against Britain, a day after the UK ambassador to Iran Robert Macaire was detained after attending a a vigil for the victims of Ukraine passenger jet. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran epa08122745 Iranian hardliners gather in front of the British embassy during an anti-Britain protest, in Tehran, Iran, 12 January 2020. According to reports, hundreds of Iranian hardliners gathered for a protest against Britain, a day after the UK ambassador to Iran Robert Macaire was detained after attending a a vigil for the victims of Ukraine passenger jet. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran epa08122786 Iranian hardliners gather in front of the British embassy during an anti-Britain protest, in Tehran, Iran, 12 January 2020. According to reports, hundreds of Iranian hardliners gathered for a protest against Britain, a day after the UK ambassador to Iran Robert Macaire was detained after attending a a vigil for the victims of Ukraine passenger jet. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west Protesters chant slogans while holding up posters of Gen. Qassem Soleimani during a demonstration in front of the British Embassy in Tehran, Iran, Sunday, Jan. 12, 2020. AP

Sepahi, who had once supported Mahmoud Ahmadinejad, the populist and controversial former president, and knew Soleimani well, also condemns the Rouhani government for its handling of the shooting down of the Ukrainian airliner.

Officials at first claimed that Iran had nothing to do with the destruction of the plane, which killed all 176 on board, but then admitted that it was shot down with a missile by mistake. The revelation led to angry street protests in the country.

“Not giving out the information at first was the biggest mistake,” says Sepahi. “No one sane would be happy at the death of so many innocent people, so why not say what happened straight away? This delay made people angry and allowed some of the opposition to do things like tear down photos of Commander Soleimani.”

Mohammad Jahangari, a strategic affairs analyst, echoes the suggestion that there could be a backlash among the electorate for the nuclear agreement.

“Space has clearly shrunk for the moderates, with anti-west and anti-US chorus growing after the assassination of General Soleimiani,” he says. “Many see the moderates as responsible for trusting the US and its allies and getting nothing in return.”

Moderates say they are being unfairly blamed for the failure of the nuclear deal and it is they who can get the economy moving again.

Vahid Toutounchi, an oil and gas analyst as well as a reformist candidate, says the nuclear deal “was the result of so many years of negotiation, not only three years, and it had a very good outcome in the oil and gas industry”.

“Now everything will be affected and people see it,” he says. “But if we have a parliament in harmony with the government we can make up the losses and find ways to move on, just as we did before the JCPOA.”

Ehsan Mottaghi, another moderate seeking a win, adds that the failure of the agreement was not just due to the west. “There was also a lot of internal opposition to it from the principalists who accused us of betraying Iran’s security, so they also tried to make sure that it did not work.”

The liberals face other pressures. There has been controversy over the decision by the Guardian Council, the powerful election supervisory body, to disqualify a disproportionately large number of their candidates.

A total of 6,850 candidates out of 14,000 have been barred from contesting the polls, including a third of the current members of parliament.

Mohammad Adabi, a reformist candidate, says a number of experienced figures have been removed from the contest, which weakened the side. But, he holds, there is a silver lining: “There were a lot of people there for a long time and what has happened has meant that we can get younger people. They can bring their expertise and fresh ideas, which is a good thing.”

President Rouhani has strongly criticised the council. But Ayatollah Khamenei, the final arbiter in the country’s complex electoral system, has backed the decision, saying there is no place in parliament for “those scared of speaking out against foreign enemies”.

There were similar accusations of bias in the last parliamentary election, but at the time the reformists overcame the obstacle in a wave of popular support.

“I doubt if they will do that this time. I will vote for them because I don’t want to see a gradual return to the Ahmadinejad times,” says Reza Gharabaghi, a 43-year-old businessman. “But a lot of people who voted for them are simply fed up now and the principalists may win.