Tehran - Gunmen and suicide bombers stormed Iran’s parliament and the shrine of its revolutionary leader on Wednesday, killing 13 people in the first attacks in the country claimed by the Islamic State group.

Dozens were injured in the attacks, which targeted two of Iran’s most potent symbols: its parliament complex in central Tehran and the mausoleum of Ayatollah Ruhollah Khomeini who led the 1979 Islamic revolution.

The standoff lasted around five hours before all the gunmen holed up in parliamentary office buildings were killed.

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.

The assaults began mid-morning when four gunmen burst into the parliament complex in the centre of Tehran, killing a security guard and another person, according to the ISNA news agency.

An interior ministry official said they were dressed as women and entered through the visitors’ entrance. One eventually exploded a suicide vest while the others were killed by security forces.

At roughly the same time, two assailants entered the grounds of the Khomeini mausoleum, killing a gardener and wounding several other people. One detonated a suicide vest, while the other was shot dead.

It was not clear whether the shrine attackers were women, as earlier reported, or just wearing female clothing.

“The terrorists had explosives strapped to them and suddenly entered the shrine and started to shoot around,” said the shrine’s overseer, Mohammadali Ansari.

Iran’s emergency services said a total of 13 people were killed in the two attacks and 43 wounded.

Iran’s supreme leader shrugged off attacks. “These fire-crackers that happened today will not have the slightest effect on the will of the people,” Ayatollah Ali Khamenei said after the twin attacks.

President Hassan Rouhani called for global unity against violent extremism. “Iran’s message as always is that terrorism is a global problem, and unity to fight extremism, violence and terrorism with regional and international cooperation is the most important need of today’s world,” he said in a statement.

The country’s powerful Revolutionary Guards vowed revenge and claimed the United States and Saudi Arabia were “involved”.

In reaction, Saudi Arabia’s foreign minister rejected the accusation by Iran’s Revolutionary Guards that Saudi Arabia was behind the twin attacks.

Speaking in Berlin, Minister Adel Al-Jubeir said he condemned terrorist attacks wherever they occur, but said there was no evidence that Saudis were behind the attacks in Tehran, adding he did not know who was responsible.

Iran’s parliament was in session as the violence unfolded and members were keen to show they were undeterred, posting selfies showing themselves as calm and continuing with regular business.

Meanwhile, gunshots continued in the neighbouring office buildings, with police helping staff to escape from windows and snipers taking position from rooftops.

Speaker Ali Larijani dismissed the attacks, saying they were a “trivial matter” and that security forces were dealing with them. The intelligence ministry said there had been a third “terrorist” team that was neutralised before the attacks started.

Tehran was on lockdown, with streets blocked and parts of the metro closed. Journalists and onlookers were kept away from the sites by police.

“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, who asked not to be named.

“I was shopping and suddenly heard shooting,” said housewife Maryam Saghari, 36, who lives near parliament. “People started to run away from the area. I was very scared. I don’t want to live in fear,” she told Reuters by telephone.

Television footage showed police helicopters circling over the parliament building, with snipers on its rooftop. Tasnim praised the elite Revolutionary Guards for confronting the attackers.

Interior Minister Abdolrahman Fazli told ISNA he had convened a special meeting of the country’s security council.

Messages of support were sent by Russian President Vladimir Putin and from the Syrian foreign ministry.

The three countries are close allies in the fight against rebels and jihadist groups in Syria. Iran has also been helping to battle IS in Iraq, which also sent its condolences.

Jihadist groups have clashed frequently with Iranian security forces along the 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 an IS plot to carry out multiple bomb attacks in Tehran and around the country.

Militant groups are also known to operate in Iran’s southeastern Sistan-Baluchistan province, which borders Pakistan and has a large Sunni community.

Jaish-ul Adl (Army of Justice), which Tehran accuses of links with Al-Qaeda, has carried out several armed attacks on Iranian soil in recent years.

The attacks took place at a particularly charged time after Iran’s main regional rival Saudi Arabia and other Sunni powers cut ties with Qatar on Monday, accusing it of backing Tehran and militant groups.

Iranian Foreign Minister Mohammad Javad Zarif, who is visiting Turkey to discuss the Qatar crisis, told reporters that the attacks will “strengthen resolve of the Iranian nation against terrorism”.

It was not clear whether the shrine attackers were women, as earlier reported, or just wearing female clothing.

“The terrorists had explosives strapped to them and suddenly entered the shrine and started to shoot around,” said the shrine’s overseer, Mohammadali Ansari.

Iran’s emergency services said a total of 13 people were killed in the two attacks and 43 wounded.

Iran’s supreme leader shrugged off attacks. “These fire-crackers that happened today will not have the slightest effect on the will of the people,” Ayatollah Ali Khamenei said after the twin attacks.

President Hassan Rouhani called for global unity against violent extremism. “Iran’s message as always is that terrorism is a global problem, and unity to fight extremism, violence and terrorism with regional and international cooperation is the most important need of today’s world,” he said in a statement.

The country’s powerful Revolutionary Guards vowed revenge and claimed the United States and Saudi Arabia were “involved”.

In reaction, Saudi Arabia’s foreign minister rejected the accusation by Iran’s Revolutionary Guards that Saudi Arabia was behind the twin attacks.

Speaking in Berlin, Minister Adel Al-Jubeir said he condemned terrorist attacks wherever they occur, but said there was no evidence that Saudis were behind the attacks in Tehran, adding he did not know who was responsible.

Iran’s parliament was in session as the violence unfolded and members were keen to show they were undeterred, posting selfies showing themselves as calm and continuing with regular business.

Meanwhile, gunshots continued in the neighbouring office buildings, with police helping staff to escape from windows and snipers taking position from rooftops.

Speaker Ali Larijani dismissed the attacks, saying they were a “trivial matter” and that security forces were dealing with them. The intelligence ministry said there had been a third “terrorist” team that was neutralised before the attacks started.

Tehran was on lockdown, with streets blocked and parts of the metro closed. Journalists and onlookers were kept away from the sites by police.

“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, who asked not to be named.

“I was shopping and suddenly heard shooting,” said housewife Maryam Saghari, 36, who lives near parliament. “People started to run away from the area. I was very scared. I don’t want to live in fear,” she told Reuters by telephone.

Television footage showed police helicopters circling over the parliament building, with snipers on its rooftop. Tasnim praised the elite Revolutionary Guards for confronting the attackers.

Interior Minister Abdolrahman Fazli told ISNA he had convened a special meeting of the country’s security council.

Messages of support were sent by Russian President Vladimir Putin and from the Syrian foreign ministry.

The three countries are close allies in the fight against rebels and jihadist groups in Syria. Iran has also been helping to battle IS in Iraq, which also sent its condolences.

Jihadist groups have clashed frequently with Iranian security forces along the 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 an IS plot to carry out multiple bomb attacks in Tehran and around the country.

Militant groups are also known to operate in Iran’s southeastern Sistan-Baluchistan province, which borders Pakistan and has a large Sunni community.

Jaish-ul Adl (Army of Justice), which Tehran accuses of links with Al-Qaeda, has carried out several armed attacks on Iranian soil in recent years.

The attacks took place at a particularly charged time after Iran’s main regional rival Saudi Arabia and other Sunni powers cut ties with Qatar on Monday, accusing it of backing Tehran and militant groups.

Iranian Foreign Minister Mohammad Javad Zarif, who is visiting Turkey to discuss the Qatar crisis, told reporters that the attacks will “strengthen resolve of the Iranian nation against terrorism”.