You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
"You have seen our revenge before ... You will see that our response will be crushing and devastating and you will regret what you have done," Hossein Salami said in a speech before the funeral of the victims broadcast live on the state television.
Thousands of people packed the streets of the southwestern Iranian city of Ahvaz to mourn the victims of Saturday's assault that killed 25 people, including 12 members of the elite Revolutionary Guards.
Many chanted "death to Israel and America".
The coffins, wrapped in the flag of the Islamic Republic, were carried by the mourners. Many held pictures of a four year old boy killed in the attack, one of the worst against the most powerful military force of the Islamic Republic.
Four assailants fired on a viewing stand in Ahvaz where Iranian officials had gathered to watch an annual event marking the start of the Islamic Republic's 1980-88 war with Iraq.
Soldiers crawled on the street to avoid bullets. Women and children fled for their lives.
Top Iranian leaders also blamed the United State's Gulf Arab allies for the bloodshed that struck a blow at the heart of its security establishment.
The accusation will almost certainly antagonise Iran's regional foe Saudi Arabia. The oil superpowers are waging a war for influence across the Middle East, backing opposite sides in Syria, Yemen, Iraq and Lebanon.
Speaking at the funeral ceremony, Defence Minister Amir Hatami warned the “terrorists” to expect the revenge of the Iranian nation.
Iran has been relatively stable compared to Arab neighbours still grappling with political and economic upheaval triggered by 2011 uprisings.
The intelligence minister, Mahmoud Alavi, said a large network of suspects had already been arrested in connection with the attack, the judiciary's news agency Mizan reported. . He did not elaborate.
Islamic State's Amaq agency posted a video of three men in a vehicle who it said were on their way to carry out the attack.
A man wearing a baseball cap emblazoned with what appears to be a Revolutionary Guard logo discussed the impending attack in Farsi in the video.
"We are Muslims, they are kafirs (non-believers)," the man says. He adds: "We will destroy them with a strong and guerrilla-style attack, inshallah (God willing)."
The Islamic Revolutionary Guards Corps (IRGC) was set up after the 1979 Islamic Revolution to protect the Shi’ite clerical ruling system and revolutionary values.
It answers to Supreme Leader Ayatollah Ali Khamenei. The IRGC has an estimated 125,000-strong military with army, navy and air units.
The violence has led to a boost in support for the Guards, according to analysts, which they will likely use to silence their critics, who include pragmatic President Hassan Rouhani.
He engineered Iran's 2015 nuclear deal with world powers that ushered in a cautious detente with Washington before tensions flared anew with President Donald Trump’s decision in May to pull out of the accord and reimpose sanctions on Tehran.
Ahvaz National Resistance, an Iranian ethnic Arab opposition movement which seeks a separate state in oil-rich Khuzestan province, also claimed responsibility.
Senior commanders of the IRGC have said the Ahvaz attack was carried out by militants trained by Gulf states and Israel, and backed by America.
But it is unlikely the IRGC will strike any of these foes directly.
The Guards could put on a show of strength by firing missiles at opposition groups operating in Iraq or Syria that may be linked to the militants who staged the attack.
Iran's Ground Force General Nozar Nemati was quoted as saying by Mizan news agency that "the agents behind this attack are identified and will be published at the appropriate time."