Isis has claimed responsibility for a pair of attacks on Iran's parliament and the shrine of Ayatollah Ruhollah Khomeini on 7 June, which left at least twelve dead and wounded more than 30 people. The siege at the legislature was ended when all four attackers were killed.

It marks the first attack in Iran claimed by the extremist group, which is at war with Iranian-backed forces in Syria and Iraq. In a message posted through its Aamaq News Agency, Isis claimed its fighters were behind the assaults.

The attacks began mid-morning when assailants armed with Kalashnikov rifles stormed the parliament building. One of the attackers later blew himself up inside, where a session had been in progress, according to a statement carried by Iran's state TV.

Deputy Interior Minister Mohammad Hossein Zolfaghari told Iran's state TV the apparently male attackers wore women's attire.

An Associated Press reporter saw several police snipers on the rooftops of buildings around the parliament. Shops in the area were shuttered, and gunfire could be heard. Witnesses said the attackers were shooting from the fourth floor of the parliament building down at people in the streets below.

"I was passing by one of the streets. I thought that children were playing with fireworks, but I realised people are hiding and lying down on the streets," Ebrahim Ghanimi, who was around the parliament building when the assailants stormed in, told Associated Press. "With the help of a taxi driver, I reached a nearby alley."

Police helicopters circled over the parliament building and all phone lines from inside were disconnected. The semi-official ISNA news agency said all entrance and exit gates at parliament were closed and that lawmakers and reporters were ordered to remain in place inside the chamber.

Ayatollah Khomeini shrine
Ayatollah Khomeini's shrine on the outskirts of Tehran (file photo) John Moore/Getty Images

Soon after the parliament attack, a suicide bomber and other assailants targeted the shrine located just outside the capital, Tehran, according to Iran's official state broadcaster. It said a security guard was killed and that one of the attackers was killed by security guards. A woman was also arrested.

In addition to being lethal, the attack on the shrine of Khomeini is symbolic. As Iran's first Supreme Leader, Khomeini is a towering figure in the country and was its revolutionary leader in the 1979 ousting of the shah.

An Associated Press reporter saw security forces, some uniformed and others in plainclothes, around the large and ornate shrine.

Isis often claims attacks around the world, even when links to the group cannot be confirmed and appear dubious. Iranian security officials have not said who they suspect is behind the attacks, though state media has referred to the attackers as "terrorists".

Sunni extremists, including Isis, despise Shiite-majority Iran. Iran has also come under attack in the past by Arab insurgents.

The unusual attacks in Iran prompted the Interior Ministry to call for an urgent security meeting, according to the state-run IRNA news agency, and officials urged people to avoid using public transportation.