The assault in the city of Ahvaz, which killed at least 25 and wounded more than 60 people, targeted a stand where Iranian officials had gathered to watch an annual event marking the start of Iran’s 1980-88 war with Iraq.
Iranian President Hassan Rouhani promises a "crushing response' after Saturday's attack on a military parade in Iran's southwestern city of Ahvaz near the Iraqi border killed at least 25 people, the semi-official ISNA news agency and state TV said.
The attack wounded more than 60, Iran's official state news agency IRNA reported. All four attackers were killed by security forces, Tasnim News Agency reported hours later.
Gunmen targeted a stand where Iranian officials were gathered to watch an annual event marking the start of Iraq's 1980 invasion of Iran.
"The response of the Islamic Republic of Iran to the smallest threat will be crushing," Rouhani said in a statement on his official website. "Those who give intelligence and propaganda support to these terrorists must answer for it."
Iran's Supreme Leader Ayatollah Ali Khamenei said that the attack was linked to the United States' "allies in the region" and ordered security forces to bring the perpetrators to justice.
"This crime is a continuation of the plots of the regional states that are puppets of the United States, and their goal is to create insecurity in our dear country," Khamenei said in a statement published on his website. He did not name the states in question.
Hours later, Iran summoned envoys of the Netherlands, Denmark and Great Britain on Saturday night, accusing them of harbouring Iranian opposition groups in their countries, IRNA reported.
“It is not acceptable that these groups are not listed as terrorist organisations by the European Union as long as they have not carried out a terrorist attack in Europe,” foreign ministry spokesman Bahram Qasemi was quoted as saying by IRNA.
TRT World's Reagan Des Vignes reports.
Both Daesh and an anti-government Arab group called the Ahvaz National Resistance, claimed responsibility for Saturday's attack.
Yaghub Hur Totsari, a spokesman for a group that identifies 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.
No evidence was provided for either of the two claims.
An Iranian military spokesman said the gunmen were trained by two Gulf Arab states and had ties to the United States and Israel.
"These terrorists... were trained and organised by two ... Gulf countries," Brigadier General Abolfazl Shekarchi told the official news agency IRNA.
"They are not from Daesh or other groups fighting (Iran's) Islamic system ... but they are linked to America and (Israel's intelligence agency) Mossad."
Terrorists recruited, trained, armed & paid by a foreign regime have attacked Ahvaz. Children and journos among casualties. Iran holds regional terror sponsors and their US masters accountable for such attacks. Iran will respond swiftly and decisively in defense of Iranian lives. pic.twitter.com/WG1J1wgVD9— Javad Zarif (@JZarif) September 22, 2018
Death toll expected to rise
A video distributed to Iranian media showed soldiers crawling on the ground as gunfire blazed in their direction.
One soldier picked up a gun and got to his feet as women and children fled for their lives.
Ali Hosein Hoseinzadeh, deputy governor in Khuzestan province, was quoted as saying the death toll was expected to rise. One of those killed was a journalist.
A video on state television's website showed confused soldiers at the scene of the attack. Standing in from of the stand, one asked: "Where did they come from?" Another responded: "From behind us."
Four militants carried out the attack and two of them were killed, according to ISNA.
Iran was holding similar parades in several cities including the capital Tehran and the port of Bandar Abbas on the Gulf.
"Shooting began by several gunmen from behind the stand during the parade. There are several killed and injured," a correspondent told state television.
The semi-official news agency Mehr said further shooting broke out as some of the attackers who managed to escape were being chased.
Blaming Saudi Arabia
Foreign Minister Mohammed Javad Zarif blamed the bloodshed on "regional terror sponsors." language that usually refers to Iran's enemies Saudi Arabia and Israel, and "their US masters", and vowed that Tehran would respond decisively.
ISNA said an unnamed spokesman for the Revolutionary Guards blamed Arab nationalists backed by Saudi Arabia for the attack.
Tensions between Iran and Saudi Arabia have surged in recent years, with the two countries supporting opposite sides in wars in Syria and Yemen and rival political parties in Iraq and Lebanon.
Ghanbar Naderi has more from Tehran.
Rare military attack
Last year, in the first deadly attack claimed by Daesh in Tehran, 18 people were killed at the parliament and mausoleum of Ayatollah Khomeini, the founder and first supreme leader of Iran.
The bloodshed struck a blow to security in OPEC oil producer Iran, which has been relatively stable compared with neighbouring Arab countries that have faced upheaval since the 2011 uprisings across the region.
Ahvaz is in the centre of Khuzestan province, where there have been sporadic protests by the Arab minority in mainly Shia Iran.