IRAN’s President Hassan Rouhani has vowed a “crushing response” to an attack on a military parade in the city of Ahvaz near the Iraqi border that has left dozens of people including women and children dead.

“The response of the Islamic Republic of Iran to the smallest threat will be crushing”, Mr Rouhani said in a statement on his official website.

The gunmen fired on a military parade in southwestern Iran killing 29 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 to watch an annual event marking the start of the Islamic Republic’s 1980-88 war with Iraq.

All four attackers were killed.

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.

The Islamic State (IS) group also claimed responsibility for the rare assault in the southwestern city of Ahvaz, while Iranian officials blamed “a foreign regime” backed by the United States.

The SITE Intelligence Group, which monitors jihadist websites, reported that IS said the attack was in response to Iranian involvement in conflicts across the region.

A local journalist who witnessed the attack said shots rang out for 10 to 15 minutes and that at least one of the assailants, armed with a Kalashnikov assault rifle, wore the uniform of Iran’s Revolutionary Guards.

“We realised it was a terrorist attack as bodyguards (of officials) started shooting,” Behrad Ghasemi told AFP.

“Everything went haywire and soldiers started running.

“The terrorists had no particular target and didn’t really seem to care as they shot anyone they could with rapid gunfire.”

Ahvaz lies in Khuzestan, a province bordering Iraq that has a large ethnic Arab community and has seen separatist violence in the past that Iran has blamed on its regional rivals.

Iran summoned diplomats from Denmark, the Netherlands and Britain over their “hosting of some members of the terrorist group” which carried out the attack, state media said.

“It is not acceptable that the European Union does not blacklist members of these terrorist groups as long as they do not perpetrate a crime on ... European soil,” official news agency IRNA quoted foreign ministry spokesman Bahram Qasemi as saying.

The British charge d’affaires, summoned in the ambassador’s absence, was told it was unacceptable “that the spokesman for the Al-Ahvazi terrorist group was allowed to claim responsibility of the attack through a London-based TV network”, according to the news agency.

He was referring to a group Tehran claims is backed by its arch-rival Saudi Arabia.

President Rouhani said: “Those who give intelligence and propaganda support to these terrorists must answer for it.”

Foreign Minister Mohammad Javad Zarif said the attack was carried out by “terrorists recruited, trained, armed & paid by a foreign regime”.

“Iran holds regional terror sponsors and their US masters accountable for such attacks,” he wrote on Twitter.

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.

“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.