In the wake of the nuclear deal, Tehran is hoping to be allowed to take its place on the world stage, but distrust of America, and especially of Israel, remains a huge obstacle

Every Friday, under the soaring minarets of the Imam Khomeini mosque in Tehran, tens of thousands of the faithful prostrate themselves in prayer after sermons that combine religious piety with the strategic goals of the Islamic Republic of Iran. Ritualistic cries of “Death to America” or “Death to Israel” do still ring out, though attention has focused recently on the talks over the country’s nuclear programme – and ending the sanctions imposed because of it.

Security is tight as the crowds pour in from the nearby highway and metro station, Shahid Beheshti – one of many named after the martyrs of the 1979 revolution. Guards carry out brisk body searches; bags have to be checked into a makeshift cloakroom. Iran, after all, is one of few Muslim countries where mosques have not experienced terrorist bombings in the last few months, especially on a Friday. The Sunni fanatics of Islamic State have targeted Shia civilians in Iraq and the Gulf states. “If Daesh [Isis] can strike in Kuwait,” says one worried intellectual, “why not in Tehran?”

Outside the mosque there are more troubling reminders of the violent neighbourhood Iran inhabits. It is normal to see little plastic boxes for zakat – Islamic charity contributions – for the poor, for orphans, and the old cause of Palestinians living under Israeli occupation. But there are also appeals for the suffering people of Yemen, where Iran’s arch-rival Saudi Arabia is carrying out air strikes against Houthi rebels, as well as for Iraqis, “to help fight Daesh”.

Now that the nuclear marathon is over, encouraging hopes for a better relationship with its old American enemy, Iran is projecting itself as an island of stability in a sea of trouble and demanding to be treated as an equal. The supreme leader, Ayatollah Ali Khamenei, continues to excoriate “global arrogance”, as he always has, but has hinted clearly at cooperation with the US once sanctions end, and dignity – a recurrent word – has been restored.

“We believe we have a constructive and positive role to play in the region, with or without an agreement,” said Amir-Hossein Abdollahian, the deputy foreign minister for the Middle East, a few days before the Vienna talks ended. “We understand that a good nuclear deal can have a good influence.” Iran’s support for Syria’s fight against “terrorism” was consistent with its backing for Hezbollah in Lebanon and opposition to Saudi attacks on Yemen, he said. “A positive nuclear outcome will have a positive outcome for relations with the west.” The only red line was Israel – “an illegitimate regime”.

Neighbouring Iraq is the most likely theatre for joint, or at least coordinated action – as happened in Afghanistan briefly after the 2001 US attack on al-Qaida and the Taliban – and before George Bush hastily incorporated Iran into his “axis of evil”. Now a US-led coalition is mounting air strikes against Isis, while Iranian Revolutionary Guards, under its Quds force commander, General Qasim Suleimani, are advising Iraqi Shia militias on the ground. But there is no coordination between Iran’s force and the US, Abdollahian was anxious to emphasise. Iran also makes no secret of its disdain for US efforts and especially its “double standards”.

“Suleimani and the US could work together if there is a nuclear agreement,” suggested Mohamed Ali Vakil, editor of the reformist newspaper Ektebar, interpreting the government’s position more explicitly. “But it will take time, because the Americans believe their national security interests are in competition with Iran’s. After all, Isis is the ideological offspring of the Saudi regime and Turkish adventurism – both US allies.”

The Tehran rumour mill points to another problem. Suleimani has been much photographed on the frontlines in Iraq and Syria and profiled in the western media. But some of his powers are said to have been taken away, suggesting concern at the top about atrocities committed by Iraqi People’s Militia units in Sunni areas. It will be harder for Iran to blame the Saudis for “incubating” the Isis takfiri doctrine – sanctioning the killing of apostates – if its own Shia allies are behaving in a brutally sectarian way. Iran has its own minorities, including Sunnis, to worry about.

Still, there is no mistaking the growing confidence engendered by Iran’s engagement in the nuclear talks and the disarray elsewhere in the Middle East. “The Arab world is in limbo and there is no real regional player except Saudi Arabia, which is playing an angry, reactive, violent game,” argues another senior adviser. “Iran is ascending and it is proving that it is able to solve a difficult problem through diplomatic means, that accommodation is more profitable than marginalisation. That’s why the Arabs and Israel react so violently to the nuclear issue.”

Facebook Twitter Pinterest A mist of water hovers over Iranians at the annual pro-Palestinian rally marking al-Quds (Jerusalem) Day in Tehran this month. Photograph: Ebrahim Noroozi/AP

But even after an agreement, the barriers to further cooperation with the US are obvious. The biggest is Iran’s profound hostility to Israel – “the world’s centre of evil, espionage and warmongering”, in the words of the defence minister, Hossein Dehghan. Al-Quds (Jerusalem) day is officially marked in Tehran more fervently than in any Arab capital. Iran’s strategic relationship with Hezbollah is solid. The idea of resistance that the Lebanese Shia movement embodies is fundamental to Iranian official thinking. It does not sit easily with even a limited rapprochement with the US.

Hardliners are concerned about the implications. Hossein Sheikholislam, an adviser to the speaker of the Majlis, Iran’s parliament, acted as interpreter for the students who took US diplomats hostage in Tehran in 1979, and he does not trust Americans any more today than he did then – though many other former militants have since become reformists. In 1987, he recalls, the USS Vincennes shot down a passenger plane that killed 290 Iranians and the captain was given a medal. “So why shouldn’t we call them Satan? Yes, it’s a long time, but time doesn’t change the essence. The change is that now we are sitting face to face and we are fighting over the table.”

Supporters of the president, Hassan Rouhani, fear a crackdown at home after a nuclear agreement. And there is a risk too that when sanctions end, assets are unfrozen and oil exports double, the Revolutionary Guards will have more cash to enable them to act as a “spoiler” to an Iranian-western honeymoon. “The hardliners just want sanctions removed, but they don’t want the contagion of relations with the US to reach other areas like human rights and foreign policy,” says an independent analyst. “They fear western values and American corruption that could create the breeding ground for a velvet revolution.”

Advocates of rapprochement with the US are more optimistic – though they do acknowledge the risks of wishful thinking. “I am not saying that the Revolutionary Guards are cleaning the windows of the old American embassy and getting ready to apologise,” quipped Sadegh Zibakalam, a leading reformist commentator. “But at some point Khamenei has to choose between cooperating with the Americans and facing the prospect of Isis on our borders. Politics makes strange bedfellows.”

Iran is keen above all to promote the notion that internationally, it deserves a seat at more tables than it is currently invited to – to play its part, and on its own terms, in resolving the multiple crises of its own tough neighbourhood. It seems to be making some headway. “None of the international processes on Syria or Iraq or on terrorism include the Iranians,” says one Tehran-based European diplomat. “If they were included and recognised as a regional leader, they would temper their ambitions. If they were treated with dignity, the supreme leader could defend a nuclear agreement on that basis. To us, dignity sounds like a bullshit concept; for them it’s serious.”