General Ramadan Sharif told the semi-official Iranian Students' News Agency the attackers were from the separatist Ahvaz Movement, which seeks to establish an independent Arab state in Khuzestan province, where the attack took place.
No evidence was provided for either of the two claims.
Reports of how the attack unfolded remained unclear immediately afterward.
Yacoub Hor al-Tostari, a spokesman for the al-Ahvaziya group, an umbrella organisation of all armed movements, said the Ahvaz National Resistance carried out the attack.
Iranian Foreign Minister Mohammad Javad Zarif had earlier blamed regional countries and their "U.S. masters" for funding and arming the separatists, issuing a stark warning as regional tensions remain high in the wake of the US withdrawal from the Iranian nuclear deal.
"They are funded by Saudi Arabia and attempted to cast a shadow over the Iranian armed forces".
Other armed security personnel shouted at each other in front of what appeared to be a viewing stand for the parade.
Jose Mourinho hits out at players' attitude after Wolves draw
So yes, it's a mental situation. "I was expecting more from my attacking players", declared Mourinho. We have to win today because after that it will be hard to close the gap.
Videos of the attack published on social media showed the parade disintegrating into chaos as people ran from a barrage of gunshots.
Footage on social media showed soldiers and bystanders scattering as shooting broke out at the parade in Ahvaz marking the 38th anniversary of Iraq's 1980 invasion of Iran.
In a statement, the foreign office said that Pakistan is against terrorism and stands with the families of victims in this time of grief.
A 2017 double bombing in Tehran claimed by the Sunni extremist group Islamic State left 18 people dead.
But attacks on regime targets inside major cities are far rarer.
Iran in response summoned diplomats from Denmark, the Netherlands and Britain to complain about them "hosting some members of the terrorist group" and "double standards in fighting terrorism", the foreign affairs ministry said.
State television gave a casualty toll of 29 dead and 57 wounded, while the official news agency Irna said those killed included women and children among spectators at the rally.
The government of Syria also expressed its "full sympathy and solidarity" with Iran, while Turkey slammed a "heinous terrorist attack".
These savage mercenaries who open fire on innocent civilians, including women and children, are linked with the same liars who claim to advocate human rights, Ayatollah Khamenei added.
It coincided with remarks by Iranian president Hassan Rouhani, who said that United States president Donald Trump will fail in his confrontation with Iran, and vowed Tehran will not abandon its missiles. The Trump administration has said it is seeking to pressure Iran over its nuclear program and military interventions throughout the Middle East.