From Wikipedia
The war began when Iraq invaded Iran on 22 September 1980 following a long history of border disputes and fears of Shia insurgency among Iraq's long-suppressed Shia majority influenced by the Iranian Revolution. Although Iraq hoped to take advantage of revolutionary chaos in Iran and attacked without formal warning, they made only limited progress into Iran and within several months were repelled by the Iranians who regained virtually all lost territory by June, 1982. For the next six years, Iran was on the offensive. Despite calls for a ceasefire by the United Nations Security Council, hostilities continued until 20 August, 1988. The last prisoners of war were exchanged in 2003