Saudi Arabia denied any involvement, but the assault further fuels boiling tensions between Riyadh and Tehran as they vie for control of the Gulf and influence in the wider Islamic world. It comes days after Riyadh and other Sunni Muslim powers cut ties with Qatar, accusing it of backing Tehran and militant groups.
They were the first attacks claimed by Islamic State inside the tightly controlled Shi’ite Muslim country, one of the powers leading the fight against IS forces in nearby Iraq and Syria.
Iranian police said they had arrested five suspects over the attacks and the country’s supreme leader, Ayatollah Ali Khamenei, struck a defiant tone.
“These fireworks have no effect on Iran. They will soon be eliminated … They are too small to affect the will of the Iranian nation and its officials,” state TV quoted him saying.
Khamenei added that Iran, which is helping Syrian President Bashar al-Assad fight rebels including Islamic State fighters, had prevented worse attacks through its foreign policy.
The powerful Islamic Revolutionary Guard Corps accused Riyadh of being behind the attacks and vowed to seek revenge.
“This terrorist attack happened only a week after the meeting between the U.S. president (Donald Trump) and the (Saudi) backward leaders who support terrorists. The fact that Islamic State has claimed responsibility proves that they were involved in the brutal attack,” a Guards statement said.
The deputy head of the Guards, Brigadier General Hossein Salami, was quoted later by Tasnim news agency as saying: “We will take revenge on terrorists and their supporters who martyred our people.”
Saudi Foreign Minister Adel Al-Jubeir, speaking in Berlin, said he did not know who was responsible for the attacks and said there was no evidence Saudi extremists were involved.
The U.S. State Department and U.N. Secretary-General Antonio Guterres both condemned the attacks.
Attackers dressed as women burst through parliament’s main entrance in central Tehran, deputy interior minister Mohammad Hossein Zolfaghari said, according to the Tasnim news agency.
One of them detonated a suicide vest in the parliament, he said. About five hours later, Iranian media said four people who had attacked parliament were dead and the incident was over.
At least 12 people were killed by the attackers, the head of Iran’s emergency department, Pir-Hossein Kolivand, was quoted as saying by state broadcaster IRIB. Some 43 people were wounded.
“I was inside the parliament when shooting happened. Everyone was shocked and scared. I saw two men shooting randomly,” said one journalist at the scene.
Soon after the assault on parliament, another bomber detonated a suicide vest near the shrine of the Islamic Republic’s revered founder, Ayatollah Khomeini, a few kilometres south of the city, Zolfaghari said.
A second attacker was shot dead, he said. The shrine is a main destination for tourists and religious pilgrims.
“The terrorists had explosives strapped to them and suddenly started to shoot around,” said the shrine’s overseer, Mohammadali Ansari.
The Intelligence Ministry said security forces had arrested another “terrorist team” planning a third attack.
Television footage showed police helicopters circling over the parliament building, with snipers on its rooftop.
The attacks follow several weeks of heightened rhetorical animosity between Riyadh and Tehran.
In unusually blunt remarks on May 2, Prince Mohammed bin Salman, who is Saudi defence minister and a son of King Salman, said he would protect his country from what he called Iranian efforts to dominate the Muslim world.
Any struggle for influence between the Sunni Muslim kingdom and the revolutionary Shi’ite theocracy ought to take place “inside Iran, not in Saudi Arabia,” he said without elaborating.
The next day Iran accused Saudi Arabia of seeking tension in the region, saying the prince had made “destructive” comments and it was proof that Riyadh supported terrorism.
The attacks could also exacerbate tensions in Iran between newly re-elected President Hassan Rouhani, a pragmatist who positions himself as a reformer, and his rivals among hardline clerics and the powerful Revolutionary Guards.
But Rouhani said they would make Iran more united and more determined in the fight against regional terrorism and violence.
“We will prove once again that we will crush the enemies’ plots with more unity and more strength,” he said.
In an appeal for unity, Rouhani’s chief of staff, Hamid Aboutalebi, took to Twitter to praise the security services.
“Applause to the power and firmness of our revolutionary guards, Basij, police and security forces,” he wrote.
However, two senior government officials, who asked not to be named, said the attacks might prompt a blame game.
“They (hardliners) are very angry and will use every opportunity to grow in strength to isolate Rouhani,” said one of the officials.
The other said it would push Iran toward “a harsher regional policy”.
Islamic State said five of its fighters carried out the twin attacks using assault rifles, grenades, and suicide vests.
A video released by its news agency Amaq included an audio track of a man saying in Arabic: “Oh God, thank you.. Do you think we will leave? No! We will remain, God willing.”
Attacks are rare in Tehran and other major cities though two Sunni militant groups, Jaish al-Adl and Jundallah, have been waging a deadly insurgency, mostly in more remote areas, for almost a decade.
Iran’s Sistan and Baluchestan province, in the southeast on the borders with Pakistan and Afghanistan, is home to the Balouch minority and has long been a hotbed of Sunni insurgents fighting the Shi’ite-led republic.
Last year Iranian authorities said they had foiled a plot by Sunni militants to bomb targets in Tehran and other cities during the Muslim holy month of Ramadan.