Khamenei was quoted on Iranian state television as calling on Iraqis to maintain unity and "disappoint the enemy."
The term "enemy" is usually used by Iran's clerical leaders to refer to the United States.
Iran's President Mahmud Ahmadinejad called Iraqi President Jalal Talabani to express his "sadness" over the incident.
"Three Days Of Mourning For 1,000 Stampede Victims"
"Baghdad Stampede Kills Some 840"