Reports say almost half of those killed were members of the Revolutionary Guard, who are under Mr Khamenei's command.
Following a deadly attack on a military parade in southern Iran, the country's foreign minister said that regional sponsors of terrorism and their "US masters" are to be held accountable for such assaults.
"Iran will respond swiftly and decisively in defence of Iranian lives", Zarif wrote on Twitter.
The parade was part of nationwide celebrations in Iran to mark the 30th anniversary of the end of the eight-year war with Iraq that started in September 1980 and ended in August 1988.
Several semi-official news outlets with reporters at the scene said the attackers were dressed in military fatigues and had approached the parade from a park, behind a temporary stand from where officials had been watching the ceremony.
Four gunmen have attacked a military parade in the city of Ahwaz, killing at least 24 people, including soldiers and civilians.
The 29 people killed in the shooting attack in Ahvaz included at least 10 members of the Islamic Revolutionary Guard. State TV hours later reported that all four gunmen had been killed.
Iranian President Hassan Rouhani has criticised the U.S. following a deadly attack on a military parade.
Iran also summoned diplomats from the United Kingdom, the Netherlands, and Denmark on Saturday, accusing their countries of harbouring Iranian opposition groups.
Islamic State militants and an Arab group in the area claimed responsibility for the attack.
Six siblings tell Arizona voters not to vote for their Republican brother
Gosar also flew to London to speak at an anti-Muslim rally, with his travel funded by the anti-Muslim Middle East Forum group. David Gosar said that their parents, who are in their 80s, are Republicans and support his brother.
But later, state media and government officials seemed to come to the consensus that Arab separatists in the region were responsible.
The separatists also accuse Iran's Shia theocracy of discriminating against its Sunni Arab citizens.
There was no immediate claim of responsibility.
How will the United States react?
"The United States stands with the Iranian people and encourages the regime in Tehran to focus on keeping them safe at home", said National Security Council spokesman Garrett Marquis.
"I would like to confirm our readiness to further enhance cooperation with our Iranian partners in the fight against this evil", he said. A statement on the Amaq news agency, which is used by IS as a mouthpiece, claimed the group was behind the attack, though this has not been verified.
Ali Akbar Velayati, the Leader's adviser on worldwide affairs, added that resistance of the Iranian nation and the Islamic establishment in the face of terrorist groups and extremist and Takfiri movements has led to the failure of all plots backed by the United States, the Israeli regime and some of their reactionary allies in the region.
Sporadic protests attacking the government over water shortages in the city of Khorramshahr south of Ahvaz, also erupted earlier this summer. The militants have made a string of false claims in the wake of major defeats in Iraq and Syria.
It was one of the worst ever attacks against the Islamic Revolutionary Guards Corp, the sword and shield of Shi'ite clerical rule in Iran since its 1979 Islamic Revolution.
At least 18 people were killed and over 50 wounded in the 2017 operation that saw gunmen carrying Kalashnikov rifles and explosives storm the Parliament complex.