U.S. President Trump speaks during an event announcing the Air Traffic Control Reform Initiative at the White House in Washington Thomson Reuters President Donald Trump released a statement Wednesday on the terrorist group ISIS' first attack in Iran, appearing to blame the country for "falling victim to the evil they promote."

Suicide bombers and gunmen attacked the Iranian parliament and the Mausoleum of Ayatollah Khomeini in Tehran on Wednesday, killing at least 12 people in a twin assault that Iran's Revolutionary Guards blamed on regional rival Saudi Arabia. ISIS claimed responsibility and released a video purporting to show gunmen inside the parliament building.

"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," Trump said in the statement. "We underscore that states that sponsor terrorism risk falling victim to the evil they promote."

The US has designated Iran as a state sponsor of terrorism.

Iran provides arms and funding to some terrorist groups, including the Shia group Hezbollah. Iran has also been expanding its influence throughout the Middle East and has aligned itself with embattled Syrian President Bashar al-Assad, who has been accused of war crimes as he fights to maintain control over his country.

Trump has taken a hard line on Iran and often condemns the deal the Obama administration cut with the country to curb its nuclear program.

The ISIS attacks there took place at a particularly charged time after Saudi Arabia and other Sunni powers cut ties with Qatar on Monday, accusing it of backing Tehran and militant groups.

ISIS has regularly threatened Iran, one of the powers leading the fight against the militants' forces in neighboring Iraq and, beyond that, Syria.

Reuters contributed to this report.