The Islamic State (Isil) has claimed responsibility for a coordinated attack by gunmen and suicide bombers on Iran’s parliament and the the shrine of Ayatollah Khomeini, the spiritual leader of the Iranian Revolution.

Teams of attackers struck the two sites in Tehran early on Wednesday morning, killing at least 12 people and wounding dozens of others, according to Iranian state media. If confirmed that Isil was behind the attack, it would be their most ambitious operation yet against Iran.

One suicide bomber blew themselves up at the Khomeini shrine, which is highly symbolic for Iran’s theocratic leadership. A second bomber later detonated their explosives at the parliament during a stand off with security forces.

Isil’s Amaq news agency released a short statement soon after the attacks saying: “Fighters from the Islamic State attacked the shrine of Khomeini and the Iranian parliament building in the centre of Tehran.”

The jihadist group claimed credit with unusual speed and released a video of the attackers inside the parliament building.</s>he Islamic State (Isil) has claimed responsibility for a coordinated attack by gunmen and suicide bombers on Iran’s parliament and the the shrine of Ayatollah Khomeini, the spiritual leader of the Iranian Revolution.

Teams of attackers struck the two sites in Tehran early on Wednesday morning, killing at least 12 people and wounding dozens of others, according to Iranian state media. If confirmed that Isil was behind the attack, it would be their most ambitious operation yet against Iran.

One suicide bomber blew themselves up at the Khomeini shrine, which is highly symbolic for Iran’s theocratic leadership. A second bomber later detonated their explosives at the parliament during a stand off with security forces.

Isil has recently stepped up its propaganda against Iran and in March released a video in Farsi, where it called on Iran's Sunni minority to rise up against the Iranian regime. The Sunni jihadist group considers Iran's Shia leaders to be apostates and worthy of death.

Iran is deeply involved in the fight against Isil in Iraq, where it controls a network of Shia militias.

At least one guard was killed when a gunman opened fire in hallway at the Iranian parliament in Tehran, the Tansim news agency said. Several others were said to be injured.

State media reported that up four gunmen were involved in the shooting at the parliament. Elias Hazrati, an Iranian MP, said he saw three attackers, one with a pistol and two with AK-47 rifles.

Shortly after the shooting broke out at the parliament, a second attack was reported at the Khomeini shrine a few miles away. Iranian authorities said several attackers entered the shrine and exchanged fire with security forces.

One of the attackers then exploded in a ball of orange flame. It was not clear if they deliberately detonated their suicide vest or if the bomb went off after being struck by a bullet.

A gardener was reportedly killed at the shrine during the attack.

The mausoleum houses the body of Ayatollah Khomeini, the first leader of the Islamic republic, and is highly symbolic site for Iran’s theocratic leadership.

Iran's parliament continued meeting even as shooting erupted outside the main chamber. Ali Larijani, the speaker of the parliament, dismissed the attacks, saying they were a "trivial matter" and that security forces were dealing with them.

Iranian MPs posted selfies from inside the parliamentary chamber in a show of defiance.</s>'Bodies of murdered Iraqis lay in streets' after ISIL shooting, an apparent bid to prevent civilians fleeing, UN says.

Fighters from the ISIL (Islamic State of Iraq and the Levant, also known as ISIS) group have killed more than 160 people in one day last week to prevent them from fleeing western Mosul, according to the United Nations.

The agency on Tuesday accused ISIL of carrying out the attack in the group's last stronghold, where a coalition of troops is working to flush out the fighters.

"The brutality of Daesh [ISIL] and other terrorist groups seemingly knows no bounds," said Zeid bin Ra'ad al-Hussein, the UN's human rights chief.

"Yesterday, my staff reported to me that bodies of murdered Iraqi men, women and children still lay on the streets of the al-Shira neighbourhood of western Mosul, after at least 163 people were shot and killed by Daesh to prevent them from fleeing."

Hussein made the comments in his opening address to the UN Human Rights Council.

His spokesman, Rupert Colville, told the AFP news agency that the killings were believed to have taken place on June 1.

In late May, Iraqi forces launched a broad assault on parts of Mosul, closing in on the remaining pockets of territory held by ISIL.

Aid groups had expressed their concerns over the safety of hundreds of thousands of civilians at risk of being caught in the crossfire.

On Monday, UNICEF warned that 100,000 children were still in ISIL-held areas, living under extremely dangerous conditions.

Peter Hawkins, UNICEF's representative in Iraq, said the agency is receiving "alarming reports" of civilians being killed, including children, with some caught in the crossfire while trying to flee.

Separately, Human Rights Watch (HRW) said on Monday that at least 26 bodies of "blindfolded and handcuffed" men were found in government-controlled areas and around the city since the operation started.

READ MORE: UN envoy: Liberation of Mosul from ISIL is 'imminent'

Local armed forces told foreign journalists that 15 men were extrajudicially killed by government forces who were holding them on suspicion of being affiliated with ISIL, the rights group said.

HRW said that in the remaining cases reported by local and international sources, the sites of the apparent executions - all in government-held territory - raise concerns about government responsibility for the killings.

Last month, Stephen O'Brien, the UN under-secretary for humanitarian affairs, said the organisation had "deep concern" for hundreds of thousands of civilians trapped behind ISIL lines.

"Although the UN is not present in the areas where fighting is occurring, we have received very disturbing reports of families being shut inside booby-trapped homes and of children being deliberately targeted by snipers," O'Brien said.

ISIL overran large areas north and west of Baghdad in 2014, but Iraqi forces backed by US-led air raids have since regained much of the territory they lost to the group.

Iraqi forces launched a major operation to retake Mosul in October last year, fighting their way to the city and retaking its eastern side before setting their sights on its smaller but more densely populated west.

The eastern half of Mosul was declared liberated in January and the push for the city's western section, separated from the east by the Tigris River, began the following month.

Almost 10,000 people fled from Mosul's northwest and the Old City every day last week, according to UN estimates.

More than 750,000 people have been displaced from the city since October.</s>The armed group is claiming responsibility for its first major assault in Tehran.

Iran is vowing revenge following twin attacks that killed at least 13 people and injured dozens of others in Tehran on Wednesday.

The Islamic State of Iraq and the Levant (ISIL) group says its responsible and is promising more Iranian attacks.

Iran's intelligence agency said the attackers were Iranian citizens commited to "acts of terror".

Iran's Revolutionary Guard blames Saudi Arabia and the US. Whoever is to blame, it ramps up the tension in a region already on edge.

US President Donald Trump warned states which sponsor terrorism "risk falling victim to the evil they promote".

With all the finger pointing around the Middle East, what hope for a peaceful solution?

Hassan Ahmadian - professor of Middle East studies at University of Tehran

Andreas Krieg - assistant professor at the defence studies department of King's College London

Trita Parsi - Georgetown University professor and author of Losing an Enemy: Obama, Iran and the Triumph of Diplomacy
The Islamic State of Iraq and the Levant (ISIL) claims responsibility for the shootings.