“Iran and Iraq are two nations whose hearts & souls are tied together… Enemies seek to sow discord but they’ve failed & their conspiracy won’t be effective,” Khamenei was quoted as saying on his office’s Twitter account.
State news agency IRNA said the supreme leader was reacting to recent violence in Iraq.
More than 100 people have been killed in Iraq since clashes erupted last week between protesters and security forces, the majority of them demonstrators struck by bullets.
Iraqi authorities have accused “saboteurs” and unidentified snipers of targeting the protesters.
In an about-face on Monday, Iraq’s military admitted “excessive force” was used in a district of the capital overnight where a mass protest led to clashes that medics and security forces said left 13 people dead.
“Excessive force outside the rules of engagement was used and we have begun to hold accountable those commanding officers who carried out these wrong acts,” the military said in a statement.
Iran has urged its citizens planning to take part in a major Shia pilgrimage in Iraq to delay their travel into the country over the violence.
Tehran has close but complicated ties with Baghdad, with significant influence among its Shia political groups.
The two countries fought a bloody war from 1980 to 1988 and Iran’s influence in the country grew after the US-led invasion of Iraq toppled Saddam Hussein in 2003.