Dozens of people, including women and children, were killed in an attack on a military parade in southwestern Iran on Saturday.
The death toll of 25 was expected to rise after gunmen attacked the parade in Khuzestan province on Saturday. More than 60 people were injured in the attack.
Almost half of the victims were members of the Islamic Revolutionary Guards Corp, state news agencies reported, making it one of the worst attacks ever on the elite force.
President Hassan Rouhani warned of a "crushing response".
"The response of the Islamic Republic of Iran to the smallest threat will be crushing", he said on his official website. "Those who give intelligence and propaganda support to these terrorists must answer for it."
Iran's Foreign Minister Mohammad Javad Zarif said he held a US ally in the region responsible. "Iran holds regional terror sponsors and their US masters accountable for such attacks," he tweeted. "Iran will respond swiftly and decisively in defence of Iranian lives."
Footage on social media showed soldiers and bystanders scattering as shooting broke out at the parade in Ahvaz marking the 38th anniversary of Iraq's 1980 invasion of Iran.
An anti-government Arab group, the Ahvaz National Resistance, was reported to have claimed responsibility for the attack. Two of the attackers were killed and two were arrested, the deputy governor said.
Yaghub Hur Totsari, spokesman for one of the two groups that identify themselves as the Arab Struggle Movement for the Liberation of Ahvaz, said the Ahvaz National Resistance, an umbrella organisation of all armed movements, was behind the attack but did not specify which group.
Mr Totsari identified one of the assailants by the initials A.M., without elaborating.
However ISIS also claimed responsibility for the attack, according to the group's Amaq agency. The group provided no evidence for the claim.
An Iranian military spokesman rejected the notion that ISIS was behind the attack and said the gunmen were trained by two Gulf Arab states and had ties to the United States and Israel.
"They are not from Daesh [ISIS] or other groups fighting [Iran's] Islamic system," Brig Gen Abolfazl Shekarchi told the official news agency IRNA. "But they are linked to America and Mossad," Israel's intelligence agency.
Russian President Vladimir Putin on Saturday denounced the attack, offering condolences to Iranian President Hassan Rouhani and calling for stronger anti-terrorism cooperation.
"Please accept the deepest condolences regarding the tragic consequences of the raid by terrorists in Ahvaz. We are appalled by this bloody crime," Mr Putin wrote to Mr Rouhani, according to the text of the telegram posted on the Kremlin website.
"We expect that everyone involved will face a deserved punishment," Mr Putin said.
The United Kingdom's ambassador to Iran Rob Macaire tweeted his condolences. "Wherever it happens terrorism must be condemned," he wrote.
Khuzestan was a major battleground of the 1980s war with Iraq and the attack on the anniversary parade in Ahvaz had significant symbolic value. The province, once known as Arabistan before Shah Reza Pahlavi annexed it in 1925 by overthrowing the ruling sheikh, is home to a decades old separatist movement.
Some Arabs, one of two main ethnic groups in the province alongside Persians, complain of systematic discrimination and demand Independence from what they describe as an “Persian occupation.” The oil-rich province is one of the country's least developed.
Arab separatists have carried out a low-level insurgency in recent years that has seen gunmen attacks on security forces and bombings. In 2017, militants claimed to have blown up two oil pipelines in western Khuzestan.
The Arab Struggle Movement for the Liberation of Ahwaz is classified as a terrorist group by the Iranian government. The group’s leader, Hamad Mola Misi, was shot and killed in front of his home in The Hague in the Netherlands last year.
Claims of government neglect have driven episodes of unrest in Khuzestan in recent years, the most recent being violent protests in May.