Iranian Supreme Leader Ayatollah Ali Khamenei accused US-backed Gulf Arab states of carrying out an attack on a military parade that killed 25 people, almost half of them members of the country's elite Revolutionary Guards.
The assault, which wounded more than 60 people, targeted a stand where Iranian officials had gathered in the city of Ahvaz to watch an annual event marking the start of the Islamic Republic's 1980-88 war with Iraq, state television said.
The bloodshed struck a significant blow to security in the oil producing country, which has been relatively stable compared with neighbouring Arab countries that have grappled with upheaval since the 2011 uprisings across the Middle East.
An Iranian ethnic Arab opposition movement called the Ahvaz National Resistance, which seeks a separate state in oil-rich Khuzestan province, claimed responsibility for the attack.
So-called Islamic State militants also claimed responsibility. Neither claim provided evidence. All four attackers were killed.
Women and children died in the assault, state news IRNA agency reported.
The assailants had hidden weapons in an area near the parade route several days in advance, said Brigadier General Abolfazl Shekarchi, a senior spokesman for Iran's armed forces.
"All four terrorists were quickly neutralised by security forces," Mr Shekarchi told state television. "A four-year-old girl and a wheelchair-bound war veteran were among the dead."
Mr Khamenei ordered security forces to bring to justice those responsible for one of the worst assaults ever against the Revolutionary Guards, the most powerful and heavily armed military force in the country, which answers to him.
The allegation will likely ratchet up tensions with Iran's rival Saudi Arabia and its Gulf allies, who along with the United States have been working to isolate the Islamic Republic.
"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," Mr Khamenei said in a statement published on his website.
He did not name the regional states he believed were to blame. Israel is also a key US ally opposed to Tehran.
Attacks on the military are rare in Iran.
The Islamic Revolutionary Guards Corp (IRGC) has been the sword and shield of Shi'ite clerical rule in Iran since its 1979 Islamic Revolution.
The Guards have a big say in Iran's regional interests and a vast stake worth billions of dollars in Iran's economy.
Ahvaz is in the centre of Khuzestan province, where there have been sporadic protests by minority Arabs. Activists said the Revolutionary Guards had arrested several people in Ahvaz after the attack.
The gunmen were trained by two Gulf Arab states and had ties to the United States and Israel, according to Mr Shekarchi.
There was no immediate Gulf Arab comment on his remarks.