Khamenei: war with Iraq proved Iran can defend itself
"Trying for eight years, doing everything they can, and yet achieving nothing - is there a greater victory for Iran?" Khamenei said.
Khamenei made the remarks in a televised video address to top military commanders and war veterans across the country, delivered at the beginning of "Holy Defence" week marking the war's anniversary.
Read also: Unravelling of the Iran nuclear deal
"The Holy Defence showed that aggression towards this country is very costly," he said.
"When a nation shows it has the power and determination to defend itself... it causes the aggressor to think twice before attacking," said Khamenei.
"And if it wants to act wisely, it would realise it is not to its benefit and is very costly."
Iraqi dictator Saddam Hussein invaded Iran a year and a half after Iran's 1979 Islamic Revolution, triggering the war that was eventually brought to an end through a UN-brokered ceasefire.
Khamenei said the conflict had made Iran's revolution "much stronger" than it was before.
The supreme leader also accused Western powers of having armed Saddam while depriving Iran of aid, saying it showed "the truth and the nature of the Western civilisation".
Saddam was only "an instrument" in the hands of the foreign powers united against the Islamic republic, he said.
His speech came after the United States unilaterally declared that UN sanctions against Iran were back in force and threated to impose "consequences" on states that fail to comply.
The move was dismissed as legally void by other world powers.
Iran and the United States have come to the brink of direct confrontation twice since June 2019.
Khamenei called on officials to preserve the memory of the war as "part of the national identity" of Iranians by creating works of literature on a global scale.
Iran this year cancelled a military parade held annually to mark the war's anniversary over the novel coronavirus pandemic, which has killed more than 24,400 and infected over 425,000 in the Islamic republic since March.
Khamenei urged Iranians to better observe health protocols such as social distancing and wearing masks, noting that the virus kills around 150 people every day in the country.
"Suppose a plane with 300 people on board crashes every two days and everyone dies. Is this a small thing?" he said.