Thirteen people were killed and more than 40 wounded in the attacks on Tehran's parliament complex and the shrine of revolutionary leader Ayatollah Ruhollah Khomeini yesterday, the first claimed by IS in Iran.
Trump said the US would "grieve and pray" for the victims, but added: "We underscore that states that sponsor terrorism risk falling victim to the evil they promote."
That was condemned by Iranian Foreign Minister Mohammad Javad Zarif, who tweeted: "Repugnant WH (White House) statement... As Iranians counter terror backed by US clients."
They were armed with rifles and pistols and at least two blew themselves up with suicide vests, Iranian media reported.
Police said five people were arrested around Khomeini's shrine on suspicion of involvement, while the intelligence ministry said a third team had been stopped before the attacks started.
IS has threatened to step up recruitment within Iran, releasing its first Persian-language video in March in which it threatened to "conquer Iran and restore it to the Sunni Muslim nation as it was before."
Iran has a sizeable Sunni population along its restive borders with Iraq and Pakistan from which IS is hoping to recruit.
Trump's comments also brought criticism from Iranians on social media, who recalled their government's offers of support and the candlelight vigils held in Iran after the attacks of September 11, 2001 in the United States.
"Iranians lit candles for you on 9/11. You kick them while they're down. Classy," tweeted Ali Ghezelbash, an Iranian business analyst.
Even as Washington expressed its condolences yesterday, the US Senate advanced legislation that would impose new sanctions on Iran, partly for what the bill described as the Iranian regime's "support for acts of international terrorism".
Iranian security officials counter that it is their regional rival Saudi Arabia -- a close US ally -- that is responsible for funding and spreading the extremism that underpins IS.
Iran's Revolutionary Guards accused Riyadh and Washington of being "involved" in yesterday's attacks, drawing a link to Trump's recent visit to Saudi Arabia.
Other Iranian leaders sought to play down the attacks, with supreme leader Ayatollah Ali Khamenei saying: "These firecrackers that happened today will not have the slightest effect on the will of the people."
Parliament was in session as the violence unfolded and members were keen to show they were undeterred, continuing with regular business.
President Hassan Rouhani said "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.
Disclaimer: No Business Standard Journalist was involved in creation of this content
