At least 12 people died and dozens were injured in gun and bomb attacks at the Iranian parliament and Ayatollah Khomeini’s shrine in Tehran, emergency services said, as cited by local media. Both assaults were later claimed by Islamic State.

Attackers opened fire on guards inside the parliament building in the Iranian capital on Wednesday morning, FARS news agency reported.

A guard from the Islamic Revolutionary Guard Corps (IRGC) was among those killed in the shooting.

A male assailant was arrested in a parliament hallway while attempting to escape, Akbar Ranjbarzadeh, a senior member of the parliament's Presiding Board, told Farsnews.

“I was inside the parliament when the shooting happened. Everyone was shocked and scared. I saw two men shooting randomly,” one journalist at the scene said, as cited by Reuters.

لحظه انفجار انتحاری در حرم امام؛ این انفجار انتحاری بیرون از محوطه حرم انجام شده است. حمله و تیراندازی در حرم امام خمینی(ره) هم‌زمان با حمله به مجلس رخ داد عکس: جماران #ایسنا_نیوز #ایسنا #photonews #تیراندازی #حمله_انتحاری ۹۶/۳/۱۸ A post shared by Iranian Student's News Agency (@isna.news) on Jun 7, 2017 at 12:35am PDT

A Tasnim reporter at the parliament said lawmakers had been locked in the building’s hall.

📸 بسته‌شدن ورودی‌های #حرم_امام (ره) از اتوبان قم با ماشین‌های آتشنشانی و پلیس pic.twitter.com/6QkyotLOy9 — خبرگزاری تسنیم (@Tasnimnews_Fa) June 7, 2017

Anti-Terrorism Special Forces (NOPO) were deployed at the parliament building, according to FARS.

Later on Wednesday, gunmen had opened fire at the mausoleum of Iran's Ayatollah Khomeini in the capital.

Local media reported that two assailants opened fire at civilians. Another assailant blew himself up in an apparent suicide attack, the news agencies said.

Tehran Governor Hossein Hashemi confirmed the incident at the Ayatollah Khomeini mausoleum, saying that one attacker was killed by security forces and other assailants were arrested, IRIB broadcaster reported, as cited by Reuters

فضای ملتهب در خیابان‌های منتهی به مجلس شورای اسلامی در پی حادثه #تیراندازی_مجلسpic.twitter.com/jhlHNsGwXM — خبرگزاری ایسنا (@isna_farsi) June 7, 2017

Following both shootings, a suicide blast was reported on the fifth floor of the Iranian parliament, Tasnim and IRIB said. Fars added that the suicide bomber blew himself up on the fourth floor.

فضای ملتهب مقابل مجلس؛ صبح امروز چند فرد مسلح وارد مجلس شدند و اقدام به تیراندازی کردند. تا کنون در این حادثه یک نفر از محافظان مجلس به شهادت رسیده است و هشت نفر مجروح شده‌اند عکس: الهه حمیدی‌کیا #ایسنا_نیوز #ایسنا #photonews #تیراندازی #مجلس ۹۶/۳/۱۸ A post shared by Iranian Student's News Agency (@isna.news) on Jun 7, 2017 at 12:19am PDT

Fars reported that two assailants opened fire at civilians. Another assailant blew himself up in an apparent suicide attack, local news agencies said.

The death toll in attacks across Tehran rose to 12, with at least 39 people injured, the head of Iran's emergency department, Pir-Hossein Kolivand, said, IRIB broadcaster and Mehr news agency reported.

The Iranian Intelligence Ministry confirmed that a terrorist group launched the attacks in Tehran.

“This morning two terrorist groups attacked the parliament and Imam Khomeini's shrine ... Members of a third group were arrested before being able to carry out any attack,” the ministry said, according to Reuters, citing Persian-language IRIB TV.

Later, Islamic State (IS, formerly ISIS/ISIL) claimed responsibility for the assaults on both the parliament and Ayatollah Khomeini's mausoleum, said Amaq news agency, which is affiliated with the group.

Mehr news agency released an alleged photo of one of the attackers killed by security guards outside the mausoleum. Grenades, an assault rifle and numerous magazines can be seen next to the body of the suspected assailant.

#BreakingNews#Iran shooting

Body of terrorist attacker shot by security outside shrine; 10 bullet mags, 8 grenades, pink liquid with him pic.twitter.com/pTCq7n8ks0 — Mehr News Agency (@MehrnewsCom) June 7, 2017

According to Ali Larijani, the current chairman of the Iranian parliament, the attacks show that extremists want to undermine the country’s efforts in its battle against terrorism.

“Iran is an active and effective hub for combating terrorism, and terrorists wish to undermine such activities,” he said, as cited by Mehr news agency.

Larijani was heading a parliament session behind closed doors as the attack unfolded.

The attacks in Tehran show that terrorists won’t cease in their efforts to cause destruction, Russian Foreign Minister Sergey Lavrov said.

“The fact that terrorist won’t stop, is, unfortunately, confirmed every day. It includes today’s attacks in Iran which were claimed by Islamic State,” Lavrov said.