ISIS claims deadly attacks on Iran parliament, shrine At least 12 were killed and many more injured in Iran's capital.

 -- ISIS claimed responsibility for twin attacks in Iran's capital on Wednesday, one at the country's parliament building and another at the shrine of Ayatollah Khomeini, the founder of the Islamic Republic of Iran.

According to The Associated Press and local media, at least 12 people were killed in the attacks and dozens were injured. Four of the assailants died in the hours-long siege at the legislature, where parliament had been in session.

Tehran's police chief Hossein Sajedinia said five people have been arrested in connection to the attacks, according to Iran's semi-official ISNA News Agency.

The attacks began mid-morning when gunmen stormed the parliament building in Tehran. One of the assailants later blew himself up inside, according to a statement issued by Iran's state news agency, IRNA.

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

An ABC News reporter in Tehran said he heard gunfire Wednesday afternoon as shops in the area remained shuttered.

Iran's semi-official Tasnim News Agency later reported that the stand-off had ended with four of the attackers dead.

A suicide bomber and other attackers also targeted the shrine of Khomein, located just outside the capital. A security guard was killed in the attack and one of the assailants was killed by security guards. A woman was also arrested, according to Iran's state broadcaster, IRIB.

Khomeini was Iran's first Supreme Leader and he led the 1979 uprising that toppled the last shah of Iran.

Pirhossein Kolivand, the head of Iran’s emergency department, told Mizan Online, an Iranian state-run news website, that 12 people were killed and 42 were wounded in the attacks.

Through its Amaq News Agency, ISIS claimed its fighters were behind the attacks, which would be the Sunni extremist group's first in Shia-majority Iran. ISIS militants are battling Iranian-backed forces in Iraq and Syria, and they view Shiites as apostates.

ISIS later released a statement in Arabic on the messaging app Telegram, saying five fighters armed with machine guns, hand grenades and suicide vests killed and wounded dozens at the parliament building and shrine. The statement, which indicates the attacks were directed and supported by ISIS, then tells "the Shiites" of Iran that "the caliphate state will not let a chance pass to attack them and spill their blood."

Amaq News Agency also released a short video purportedly taken inside the parliament building during the siege. The video, which was circulated online, shows a gunman and a bloody, lifeless body of a man on the ground next to a desk.

A voice in the video says in Arabic: “Do you think we will leave? We will remain, God willing.” Another voice repeats the same words.

Iran's revolutionary guards stopped short of saying Saudi Arabia directed the attacks, saying in a statement Wednesday that it was "meaningful" the attacks took place not long after U.S. President Donald Trump traveled to Riyadh and expressed American support for the Sunni-majority nation.

In the statement, the Islamic Revolutionary Guard Corps accused Saudi Arabia of "constantly" supporting terrorism, including ISIS, and said that ISIS claiming responsibility "reveals" that Saudis had a hand in the attacks in Tehran.

The U.S. State Department issued a statement condemning the attack. "We express our condolences to the victims and their families, and send our thoughts and prayers to the people of Iran. The depravity of terrorism has no place in a peaceful, civilized world."

But the White House, which also decried the attack in a statement, added a pointed barb at the Iranian government.

"We grieve and pray for the innocent victims of the terrorist attacks in Iran, and for the Iranian people, who are going through such challenging times," it read. "We underscore that states that sponsor terrorism risk falling victim to the evil they promote."

In a subsequent tweet, Iran's Foreign Minister Javad Zarif called the White House statement "repugnant" and said that the "Iranian people reject such U.S. claims of friendship."

ABC News' Afshin Abtahi and Lena Masri contributed to this report. The Associated Press also contributed to this report.