Twin attacks on the Iranian parliament and Ayatollah Khomeini's shrine in Tehran, have killed at least 12 people.  

The attacks, which drew worldwide condemnations, were claimed by the Islamic State (IS) extremist group, which released a video purporting to show gunmen inside the parliament building.

It is the first time the Sunni militant organization has claimed responsibility for an attack in tightly controlled Shi’ite-majority Iran.

In a statement, IS warned of further attacks against Iran's Shia Muslim majority, according to the BBC.

Iran's Supreme Leader Ayatollah Ali Khamenei said the attacks would have “no effect” on the country.

President Hassan Rouhani said Iran's message was that "terrorism is a global problem", and he called for “regional and international co-operation and unity.”

“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,” Rouhani said in a statement published on the ISNA news agency.

The BBC reports Iran's powerful Islamic Revolutionary Guards Corps (IRGC) accused the United States and Saudi Arabia of being behind the action and vowed revenge.

Separately, the deputy chief of the IRGC's Intelligence Service, Mohammad Hossein Nejat, told the Fars News Agency (FNA) that the men who attacked the parliament building in Tehran were aged between 20 and 25.

The head of Iran's emergency department, Pir Hossein Kolivand, said 43 people were also wounded in the attacks. It is not clear whether the attackers were included in the death toll.

The attacks occurred after Saudi Arabia and other Sunni Muslim powers cut ties with Qatar on June 5, accusing it of backing Tehran and militant groups.

Reuters says Sunni Saudi Arabia denied any involvement in the Tehran attacks, but the assault further fuels tensions between Riyadh and Tehran as they vie for control of the Gulf and influence in the wider Islamic world. 

The attacks began midmorning, when officials said assailants dressed as women and armed with Kalashnikov rifles entered the parliament building through the main entrance.

"One of them was shot dead and another one detonated his suicide vest," Deputy Interior Minister Mohammad Hossein Zolfaghari said, according to the semiofficial Tasnim news agency.

After an hours-long siege that ended with four attackers dead, Iranian media reported that the assault on the parliament building was over.

The situation was also calm at Khomeini’s mausoleum in southern Tehran, which had been targeted by a suicide bomber and other assailants.

According to ISNA news agency, after the attack in the mausoleum of Ayatollah Khomeini, five suspects were arrested by the police.

One assailant reportedly detonated a suicide vest, another was killed by security forces, and the rest of the attackers were arrested. 

The two attacks occurred at about the same time and appeared to be coordinated, reports said.