All wars end eventually, and all wars live on.  Thirty-five years ago, the longest war of the last century erupted. But what unfolded as a brutal eight-year confrontation between Iran and Iraq still resonates today.  "On many sides, that war is still being fought, in a way, again and again," reflects Iraqi poet and writer Sinan Antoon, who grew up in Baghdad.  "I think the Iran-Iraq war has had a profound impact on the way in which the Islamic Republic developed," notes Prof Ali Ansari, of the University of St Andrews in Scotland. "The more hardline Revolutionary Guard have used it as a foundational myth."  And the human cost is everlasting.  "Our neighbour lost both of his legs during that war," recalls Antoon, now an associate professor at the Gallatin School at New York University. "In 1990, when Saddam Hussein gave up on everything he supposedly fought the war for, my neighbour said, 'Why did I lose my legs then? It was all for nothing.'"  An estimated million lives were lost. An entire generation was scarred on both sides of a bitter divide.  And yet lessons learned were also lost in a region now engulfed by devastating fires fuelled by proxy wars among regional and world powers. Syria, Iraq and Yemen are all being torn apart along deepening fault lines: Shia against Sunni, Persian versus Arab, alliances of a "new Cold War" forged by Moscow and Washington.  The Iran-Iraq war was, in some ways, a markedly different time. Iraq was under the authoritarian rule of Saddam Hussein who was later toppled, put on trial, and executed after the US-led invasion of 2003.  Neighbouring Iran was led by Ayatollah Khomeini who had just returned from exile to lead the 1979 Iranian revolution which ousted the Shah. A confrontation with his arch-rival Saddam galvanised his nation as he struggled to consolidate his revolution against enemies at home.  Hostilities erupted in September 1980 after months of mounting tension across the border. Iraqi troops advanced several hundred miles into Iranian territory and its warplanes struck Tehran's airport.  "Even though Saddam was responsible in a legal perspective for an illegal invasion, Khomeini provoked through subversion and massive propaganda," asserts Prof Mansour Farhang who, until a year before the war, had been Iran's ambassador to the United Nations and worked with international mediators in the first years of the war to try to stop it.  As the war dragged on, both sides drew on support and supplies from foreign allies, with the United States emerging as a significant provider of economic and military aid to Iraq. Iran's fighting force was also powered by the astonishing zeal of its fighters who flooded to the front.  But, as the years went by, it came to be known as the "forgotten war", even as Iran and Iraq kept paying an increasingly steep price.  But the world woke up to the scale of the carnage when Saddam unleashed the horror of chemical weapons against Iranian foes and his own Iraqi Kurds backing them.  And Iran's mind was concentrated on the urgent need to find a way out when Iran Air Flight 655 was shot down in July 1988 by the American cruiser USS Vincennes, killing 290 people on board. The US government expressed "deep regret" but it heightened Iran's suspicion that Washington was about to become directly engaged in this conflagration.  Ayatollah Khomeini described his reluctant decision to accept a UN resolution to end hostilities as "drinking poison".  Three decades on, many invoke this description to explain his successor Ayatollah Khamenei's difficult decision to accept this year's agreement with world powers, including the United States, to significantly curb its nuclear programme.  But Iran is now a powerful player in the region, with significant sway over Iraq's powerful Shia-dominated leadership and some of its well-armed militias.  And Iraq, since 1988, has lurched from one war to the next and now finds itself battling the terrifying rise of the so-called Islamic State, a virulently anti-Shia movement.  Ayatollah Khomeini tried and failed to rally Iraq's majority Shia to his side in the eight-year war. But sectarian tensions course through much of the violence now tearing at Iraq's very survival as a unified state.  And neighbouring Syria is a battleground between President Assad's forces backed by Iran and Russia, and armed opposition forces bolstered by an array of Arab and Western states.  Most tragic of all, the mounting despair of millions now displaced from their homes is manifested in the mass displacement of desperate asylum seekers making their way to Europe.  The lament of Iraqi Ahmed al-Mushatat, conscripted into the 1980s war after his medical studies, is now a constant refrain across the region: "We thought this war will never finish. We were losing our friends, our cousins, our brothers, every day."  Wars do eventually end. But wars of our time threaten to drag on even longer than long wars of the last century.  Analysis: The Iran-Iraq War's Legacy is on BBC Radio 4 at 20:30 BST on Monday 5 October and can be listened to later via podcast.
The BBC's Lyse Doucet asks how far the Middle East today is defined by the legacy of the Iran-Iraq war.