Khamenei ordered security forces to bring to justice those responsible for one of the worst assaults ever against the Revolutionary Guards, the most powerful military force in the country, which answers to him.
The allegation will likely ratchet up tensions with Iran's rival Saudi Arabia and its Gulf allies, which along with the United States have been working to isolate the Islamic Republic.
"This crime is a continuation of the plots of the regional states that are puppets of the United States, and their goal is to create insecurity in our dear country," Khamenei said in a statement published on his website.
He did not name the regional states he believed were to blame. Israel is also a key US ally opposed to Tehran.
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 assault, which wounded at least 70 people, targeted a viewing 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, state television said.
Iran has been relatively stable compared with neighbouring Arab countries that have grappled with upheaval since the 2011 uprisings across the Middle East.
Women and children died in the assault, state news IRNA agency reported.
The assailants had hidden weapons near the parade route several days in advance, said Brigadier General Abolfazl Shekarchi, a senior spokesman for Iran's armed forces.
"All four terrorists were quickly neutralised by security forces," Shekarchi told state television. "A four-year-old girl and a wheelchair-bound war veteran were among the dead."
Attacks on the military are rare in Iran.
Iran summoned the envoys of the Netherlands, Denmark and Britain on Saturday night over the shooting, accusing them of harbouring Iranian opposition groups in their countries. Some members of the ethnic separatist movements are based in the European countries.
Iranian foreign ministry spokesman Bahram Qasemi said Iran "asked their governments to condemn the attack and extradite people linked to it to Iran to be put on trial."
"It is not acceptable that these groups are not listed as terrorist organizations by the European Union as long as they have not carried out a terrorist attack in Europe," Qasemi was quoted as saying by IRNA news agency.
POWERFUL FORCE
The Islamic Revolutionary Guards Corp (IRGC) has been the sword and shield of Shi'ite clerical rule in Iran since its 1979 Islamic Revolution.
The Guards have a big say in Iran's regional interests and a vast stake worth billions of dollars in Iran's economy.
State television's website featured a video showing confused soldiers. Standing in front of the stand, one asked: "Where did they come from?" Another responded: "From behind us."
Ahvaz is in the centre of Khuzestan province, where there have been sporadic protests by minority Arabs.
The gunmen were trained by two Gulf Arab states and had ties to the United States and Israel, according to Shekarchi.
There was no immediate Gulf Arab comment on his remarks.
Fars news agency quoted a local Iranian official as saying that Monday would be declared a national day of mourning.
REGIONAL TENSIONS
Iran and Saudi Arabia support opposite sides in wars in Syria and Yemen and rival political parties in Iraq and Lebanon, fuelling instability in the Middle East.
The attack occurred a day before Iranian President Hassan Rouhani heads to New York to address the annual United Nations General Assembly next week.
On his Instagram account, Rouhani said: "Those who are supporting these terrorists will be held responsible."
Iranian analysts said the attack may benefit the Guards.
"Rouhani will use the terrorist attack to justify Iran's presence in the Middle East ... The attack will strengthen the IRGC's position inside Iran and in the region," Tehran-based political analyst Hamid Farahvashian said.
Iran faces pressure to swiftly respond to the high-profile attack, which has hurt the security establishment's prestige.
"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 re-impose sanctions on the Islamic Republic.
"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.
Egypt, a key ally of Saudi Arabia, also condemned the attack.
Kurdish militants killed 10 Revolutionary Guards in an attack on an IRGC post on the Iraqi border in July.
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, founder of the Islamic Republic.