For nearly a decade in the 1980s, Saddam Hussein’s Iraq and the newly founded Islamic Republic of Iran waged a merciless war against each other. The fighting saw the return of World War I-style human-wave offensives, trench warfare, and chemical weapons attacks.

Though it dragged on for years, the Iran-Iraq war benefited neither side. In the end, the conflict claimed the lives of over a million people, since, despite the carnage and wishes of ordinary people on both sides to end it, no diplomatic solution proved possible over eight years of fighting.

There is good reason to worry that this ugly history is repeating itself today in Eastern Europe.

Like the Iran-Iraq war, the war in Ukraine was triggered by an expansionist dictator hoping to make quick work of a neighbor whom he had wrongly predicted would prove incapable of defending itself. Now, over a year into the fighting, the conflict, which has already claimed hundreds of thousands of casualties by some estimates, has ground to a bloody stalemate that has transformed once-anonymous Ukrainian towns like Bakhmut and Marinka into killing fields.

A peace treaty that puts a stop to this chaos is attractive for many obvious reasons, and foreign powers like China and India have recently indicated that they would like to encourage one. Yet observers say that all signs point to the war dragging on for years to come, with both sides — like Iranians and Iraqis in the past — committed to the belief that victory is within their grasp and that pressing the war forward is worthwhile.

“I don’t see any prospect of diplomacy. What both sides would accept as an equitable settlement to the war is very far apart,” said Rajan Menon, the author of “Conflict in Ukraine: The Unwinding of the Post-Cold War Order” and a research fellow at Columbia University. Menon pointed to Russian President Vladimir Putin’s declaration that the four Russian-controlled Ukrainian provinces had already been annexed — a position he is extremely unlikely to back away from.

“I don’t see any prospect of diplomacy. What both sides would accept as an equitable settlement to the war is very far apart.”

“On the Ukrainian side,” Menon said, “because their country has been invaded and has witnessed immense destruction and atrocities, there is a coming together of Ukrainian sentiment to fight against Russia. They have no illusions about a quick victory and have already priced in that they will have to endure this for a long time.”

Menon argues that the war is thus likely to continue for many years to come, a prediction that is echoed by many other observers. Some have argued that the conflict will become a permanent part of the international system, only concluding if either Ukraine or Russia collapses, or both cease to exist as states. Even if a negotiated settlement emerges sometime in the future, the amount of destruction that will have likely taken place by that time will be staggering.

The war has already taken a devastating toll on the Ukrainian population, which has suffered civilian massacres and systematic destruction of infrastructure. Yet it has also proved damaging to Russia. In addition to suffering Western sanctions, which are likely to escalate in the years to come, huge numbers of young Russian men have been killed, wounded, or simply fled the country to escape military enlistment. According to The Economist, this exodus and killing off of young Russians means that there are now 10 million more Russian women than men in the country — a situation that portends a demographic nightmare for an already rapidly aging population.

In a sense, the U.S. has played a role in prolonging the conflict by heavily arming the Ukrainians to resist Russia’s aggression. The position has drawn scrutiny from some sectors of the U.S. political establishment. Noninterventionist foreign policy observers from the realist, right-wing, and left-wing camps have characterized the conflict as overly costly in financial terms, blamed the U.S. for provoking Russia with the prospect of NATO expansion, or suggested that it would be the lesser evil to cease arms shipments to the Ukrainians and let the conflict conclude swiftly, accepting a likely Russian victory.

What these positions fail to account for are the actions of Ukrainians, who, over a year of grueling fighting, have proven themselves very committed to preserving their own nationhood and territorial integrity.

“If you are calling to stop the war right now, and you’re a person on the left, you’re effectively telling Ukrainians to accept the partition of their country, which is the same position as the MAGA right,” Menon said. “Ukraine would have to cease existing as a coherent state and be truncated. But through his actions, Putin has kind of remade Ukrainian nationalism, and they have a commitment to win.”

Despite the unlikelihood of a negotiated outcome to the war coming any time soon, there are signs of longer-term planning for an endgame by the United States.

While U.S. leaders were glad to egg on the Iran-Iraq war for years — including arming both sides and helping facilitate chemical weapons attacks against Iran by Saddam — there seems to be less appetite for the risk of an indefinite conflict involving a nuclear power like Russia.

A recent report by the RAND Corporation laid out the consequences for the U.S. of a very long war in Ukraine, including the small but persistent possibility of nuclear escalation. The report acknowledged that Ukrainian and American interests may well diverge in the future, with Americans coming to prioritize ending the conflict over helping Ukraine regain full control of its occupied territory — a goal ultimately more important to Ukrainians than Americans.

“The U.S. is currently engaged in [a] protracted attempt to punish Russia because they have offended our moral sensibilities. I don’t think that is inherently wrong, but it’s different from saying that it’s a critical national security interest,” said Benjamin Friedman, policy director at the realist foreign policy think tank Defense Priorities and a lecturer at George Washington University. “We have already underlined that invading other countries in this day and age is very costly. Russia has been punished heavily for violating Ukrainian sovereignty, and I don’t think that anyone would look at them after today and say that they are an example to emulate.”

For now, the fighting will continue and may even increase. Ukraine is likely to pursue a counteroffensive against Russia this spring, even as soldiers on both sides continue to die in the grueling battle for the town of Bakhmut.

The U.S., for its part, is reportedly looking at upping its own support by providing F-16s to the Ukrainian military, with pilots now being brought stateside for training. Unlike in the Iran-Iraq war, where the U.S. armed both countries at various times in order to keep the conflict going and kill as many people on both sides as possible, in the Ukraine war, it has clearly picked one side to support to the hilt.

“The war has a low probability of a serious escalation, but the longer you continue to roll those dice, even if the odds are low, the more likely you are to hit on a future disaster.”

Faced with the Russian invasion, heavily arming Ukraine may indeed be the least bad option. Yet despite paying dividends in slain Russian troops, this policy, likely to keep the war going for a long time to come, will keep the risk of far more dangerous escalation alive down the road. Just as the horror of the Iran-Iraq war had unintended long-term consequences for U.S. politics in the Middle East, an endless conflict in Ukraine will likely give shape to an Eastern Europe that is more radicalized and dangerous for Americans in the future.

“A lot of people basically have the view that it’s great that we’re killing Russians and weakening Russia for the future. It will prevent them from invading other countries, and, so long as it’s Ukrainians who are signed up on the front lines, there’s no real issue for the United States,” said Friedman. “But the war going on and on is bad for the United States. The war has a low probability of a serious escalation, but the longer you continue to roll those dice, even if the odds are low, the more likely you are to hit on a future disaster.”