TEHRAN: The Iranian Revolutionary Guard have issued a statement accusing Saudi Arabia of being behind Wednesday's deadly attacks at the shrine of Ayatollah Khomeini in Tehran.
The accusation came in a statement issued a few hours after the attack.
Gunmen and suicide bombers stormed Iran's parliament and the shrine of its revolutionary leader on Wednesday, killing 12 people in the first attacks in the country claimed by the Islamic State group.
Dozens of people were wounded in the attacks, which ended after a standoff lasting several hours as the gunmen holed up in parliamentary office buildings.
IS released a video of the attackers from inside the building via its Amaq propaganda agency - a rare claim of responsibility while an attack was still going on.
Police said all the attackers had been killed by around 3 pm (1030 GMT), some five hours after it started.
The IS considers Shia Iran to be apostates, and Tehran is deeply involved in fighting the group in both Syria and Iraq.
The assaults began mid-morning when four gunmen burst into the parliament complex in the centre of Tehran, killing a security guard and one other person, according to the ISNA news agency.
An interior ministry official said they were dressed as women and entered through the visitors' entrance.
At roughly the same time, a team of three or four assailants entered the grounds of the mausoleum of Ayatollah Ruhollah Khomeini, who led the 1979 Islamic revolution, killing a gardener and wounding several other people.
Iran's emergency services said a total of 12 people were killed in the two attacks and 39 wounded.
Two of the attackers at the shrine, one of them a woman, blew themselves up, while another detonated a suicide vest on the fourth floor of the parliamentary office building.
A picture on social media showed police helping staff escape through windows.
Large crowds gathered around cordons to watch as police struggled to disperse the crowds.
Parliament was in session as the attacks unfolded and members were keen to show they were undeterred, continuing with regular business.
Some posted selfies of themselves looking calm, even as gun battles raged in surrounding office buildings and snipers took position on nearby rooftops.
Speaker Ali Larijani dismissed the attacks, saying they were a "trivial matter" and that security forces were dealing with them.
An official at Khomeini's mausoleum in south Tehran said "three or four" people had entered via the western entrance and opened fire, according to the Fars news agency.
It published photos showing the suicide bomber blowing herself up outside.
The intelligence ministry said there had been a third "terrorist" team that was neutralised before the attacks started.
The city was on lockdown, with streets blocked and parts of the metro closed. Journalists were kept away from the shrine by police.
Interior Minister Abdolrahman Fazli told ISNA he had convened a special meeting of the country's security council.
Militants have clashed frequently with security forces along Iran's borders with Iraq and Afghanistan, but the country has largely escaped attacks within its urban centres.
The intelligence ministry said in June 2016 that it had foiled a plot to carry out multiple bomb attacks in Tehran and around the country.
IS published a rare video in Persian in March, warning that it "will conquer Iran and restore it to the Sunni Muslim nation as it was before."
Iran, the predominant Shia power, has been helping both Iraq and President Bashar al-Assad's regime in Syria to battle IS.
The group is under increasing pressure in both countries, having lost significant territory in the face of offensives now targeting its last two major urban bastions, Raqa in Syria and Mosul in Iraq.
Iran's supreme leader Ayatollah Ali Khamenei said on Sunday that attacks by IS in Europe and elsewhere showed that Western policies in the Middle East have backfired.
"This is a fire that (Western powers) themselves ignited and now has backfired on them," he told a gathering of senior officials in Tehran.
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ