"The world public, especially Iran, finds this terrorist attack -- which happened a week after the meeting of the U.S. president with the head of one of the region’s backward governments supporting fundamentalist terrorists -- as meaningful," the corps said in a statement on their official website Sepahnews.

The statement refers to U.S. President Donald Trump’s May 21 visit to Saudi Arabia.

The Guard Corps also confirmed that Daesh claimed responsibility for the attack, and it vowed revenge.

12 dead, dozens injured

Gunmen in Tehran opened fire inside Iran’s parliament building and near a shrine devoted to Ayatollah Khomeini, killing at least 12 people and injuring another 43, according to Iranian officials.

The semi-official Tasnim news agency has since reported that security forces neutralized all the assailants. Four gunmen were involved in the attack on parliament, the IRNA news agency reported, citing Iranian lawmaker Qolam-Ali Jafarzadeh Imenabadi.

Three guards were reportedly injured when the attackers, armed with Kalashnikov assault rifles and a handgun, opened fire inside the assembly building.

Imenabadi was quoted as saying that at least one guard had been killed in the ensuing exchange of fire.

The Fars News Agency, meanwhile, reported that five people had been killed -- and at least 10 injured -- in the parliament attack.

The attackers also took four people hostage on the upper floors of the parliament building, Tasnim reported.

The news agency, which put the death toll from the parliament attack at seven, also published an image of an alleged attacker displaying a hostage from a window.

Shrine attack

In a simultaneous attack to the south of Tehran, four attackers opened fire at a shrine dedicated to Ayatollah Khomeini, the founder of the Islamic republic, Fars reported.

According to that news agency, one person was killed and several more wounded in a bomb and gun attack.

Fars reported that three attackers had opened fire on visitors at the shrine, while a fourth blew himself up outside a police station across from the site.

The same news agency added that one attacker had committed suicide by swallowing a cyanide pill, while a female terrorist had been captured by the authorities.

Ali Khalili, an official at the shrine, told IRNA that an “armed man” had blown himself up outside the mausoleum.

Anadolu Agency