Gunmen have fired on a military parade in southwestern Iran, killing 25 people, almost half of them members of the Revolutionary Guards, state news agencies reported, in one of the worst attacks ever on the elite force.
State television said 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.
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.
Islamic State militants also claimed responsibility. Neither claim provided evidence. All four attackers were killed.
Women and children also died in the assault, state news IRNA agency reported.
The bloodshed struck a blow to security in OPEC oil producer Iran, which has been relatively stable compared with neighbouring Arab countries that have grappled with upheaval since the 2011 uprisings across the Middle East.
The Islamic Revolutionary Guards Corp (IRGC) have been the sword and shield of Shi'ite clerical rule in Iran since its 1979 Islamic Revolution.
The Guards, the most powerful and heavily armed military force in the Islamic Republic, also play a big role in Iran's regional interests in countries such as Iraq, Syria and Yemen.
They answer to Supreme Leader Ayatollah Ali Khamenei and have a vast stake worth billions of dollars in the economy.
A video distributed to Iranian media showed soldiers crawling as gunfire blazed towards them. One picked up a gun and scrambled to his feet as women and children fled for their lives.
Iran will face pressure to respond to the high-profile attack on the Revolutionary Guards, the strategic force with the greatest commitment to the clerical leadership.
"The attacks are doubtlessly meant to tarnish the prestige of the IRGC, but I believe the terrorist incidents will strengthen the IRGC's standing and even mobilise some public support," said Ali Alfoneh, senior fellow at the Gulf Arab States Institute in Washington.
Hardliners like the IRGC have gained standing at the expense of pragmatists in Iran's multi-tiered leadership since president Donald Trump decided in May to pull the United States out of the 2015 international nuclear deal with Tehran and reimpose sanctions in moves to isolate the Islamic Republic.
Attacks on the military are rare in Iran.
Kurdish militants killed 10 Revolutionary Guards in an attack on an IRGC post on the Iraqi border in July, Iran's semi-official Tasnim news agency reported, the latest bloodshed in an area where armed Kurdish opposition groups are active.
Last year, in the first deadly assault claimed by Islamic State in Tehran, 18 people were killed at the parliament and mausoleum of Ayatollah Ruhollah Khomeini, the founder of the Islamic Republic.