Iran and Iraq are remembering their eight-year war in the 1980s, exactly 25 years after the conflict began.
Iranian President Mahmoud Ahmadinejad struck a defiant note at a military parade in the Iranian capital Teheran.
He warned that any country attacking the Islamic republic would face a "destructive and fiery" response.
His remarks come as Iran is under increasing international pressure because of its decision to push ahead with its nuclear programme.
The Iranian president did not mention the dispute specifically.
He was speaking at a parade of troops, missiles and other military hardware on the 25th anniversary of the outbreak of war with Iraq.
It marked the start of "Sacred Defence Week", an annual commemoration of the invasion by Saddam Hussein's forces.
There have been no official commemorations in Iraq, but the new government in Baghdad has apologised to Iran for Iraq's invasion of Iranian territory, under Saddam Hussein's leadership.
"Our nation wants peace, stability, justice and equality in international relations," said Mr Ahmadinejad in his speech. "We have always sought friendly relations with other countries.
"Our nation wants the well-being of other countries and will not do anything against their national interest."
But he added: "If some want to again test what they have tested before, the flame of the Iranian nation will be very destructive and fiery.
IRAN-IRAQ WAR DATES
Iraqi forces invade Iran
Iran counterattacks, rejects ceasefire offer
Iran attacks Gulf shipping, escalating Tanker War
Bombing of civilian centres in War of the Cities
UN resolution 598 calls for ceasefire
US carrier shoots down Iranian civilian airliner, claiming it thought it was an Iranian fighter
"Relying on our nation and armed forces, we will make the aggressor regret their actions."
He told Iran's army to "prepare their defensive readiness" and called for an "expansion of the defence industries and the utilisation of the latest technology".
The UN nuclear watchdog, the International Atomic Energy Agency, is investigating US allegations that Iran is using a civilian nuclear programme as a front to develop atomic weapons.
Tehran says its nuclear ambitions are entirely peaceful, but it is now facing the threat of being referred to the United Nations Security Council for possible sanctions.
The 1980-88 Iran-Iraq war - in which the West backed Saddam Hussein against the new Islamic regime in Tehran - became a long and brutal conflict which led to the deaths of up to a million people.
Iraq used chemical weapons against Iran and against the Kurds in northern Iraq.
The official reason for the Iraqi invasion was a border dispute, but there were also other tensions.
The new Iranian government - created after Islamic revolution the year before - was strongly opposed to Saddam Hussein's suppression of Shia groups in Iraq.
Iraq suspected the Iranian leader, Ayatollah Khomeini, of trying to use such groups to export Iran's Islamic revolution.