Thousands were taken captive during the war
Iran and Iraq have agreed to a major release of prisoners from the two countries' bitter 1980-88 war.
Iran will release all 941 remaining Iraqi prisoners-of-war in exchange for Iraq freeing 349 Iranians held in its custody, the Iraqi foreign ministry said.
Iran's foreign ministry confirmed that an agreement had been reached on Wednesday and said the exchange would take place on Monday at the Khosravi border post in western Iran.
Iraq denies holding any actual Iranian prisoners-of-war and described its captives as common criminals or border trespassers of Iranian nationality.
Iranian foreign ministry spokesman Hamid Reza Assefi said that while Tehran would be releasing all remaining Iraqi PoWs, the fate of Iranians missing in Iraq since the war was "still open".
The two neighbours have freed thousands of prisoners seized during the war in recent years.
However the issue has continued to damage relations between the countries, which accuse each other of holding more captives.
About one million people died in the eight-year war
The countries have also on occasion repatriated the remains of those killed in the war and of prisoners who died in captivity.
About one million Iranians and Iraqis are estimated to have been killed during the eight-year war, with many thousands of prisoners captured on both sides.