Obviously, U.S.-Iranian relations today differ in many ways from U.S.-Soviet relations in the late 1980s. But today, as then, the two sides are waging a cold war that is taking a horrifying toll on the people whose countries have been made battlefields. One hundred and thirty thousand Syrians have already died. More than 2 million are displaced. Many are at risk of starvation. Polio is breaking out. The best thing the United States can do for Syrians, by far, is to reach a nuclear deal that ends its cold war with Iran.

Iran has good reason to want the carnage in Syria to stop. Propping up Bashar al-Assad is costing Tehran’s sanctions-ravaged regime financially. Iranian Revolutionary Guard forces are dying on Syrian soil. Most importantly, the war has devastated Iran’s reputation. As a Persian, Shia power, Iran’s Islamic regime has traditionally looked for causes—like the Palestinians—that give it credibility in the Sunni-dominated Arab and Muslim world. Tehran’s support for Assad’s murderous repression of Syria’s Sunnis has done the exact opposite. Iran’s approval rating in 20 Muslim-majority countries, according to Zogby Research Services, has plunged from 75 percent in 2006 to 25 percent today.

So what’s preventing Iran from backing a process that eventually leads to Assad’s exit? According to Iranian-American journalist Hooman Majd, author most recently of The Ministry of Guidance Invites You to Not Stay, Iran’s militant Revolutionary Guards see Assad’s Syria as a key base for projecting Iranian power. Others in the Iranian regime are less convinced of Assad’s value, but fear that the forces that oust him will use Syria as a beachhead to try to oust them. The United States cannot entirely allay that fear since acolytes of al-Qaeda now dominate the militias fighting Assad. Still, it would be easier for Iran’s regime to support elections that produced a Sunni-led Syrian government if the U.S. promised to try to prevent that government from expressing virulent hostility to Iran. And the U.S. can’t credibly make that promise if Iran’s leaders think Washington is virulently hostile itself.

For a model of what post-cold war cooperation with Iran might look like, the U.S. can look to Turkey. Turkey’s Sunni Islamist regime initially supported Syria’s rebels. But now, seeing the danger their extremism poses, it says it will back a peace agreement that allows some elements of the current Syrian regime—though presumably not Assad himself—to remain. For months, Turkey has been pushing for Iran to participate in the conference on ending Syria’s civil war scheduled for later this month in Geneva. This weekend, to his credit, John Kerry partially agreed.

Make no mistake: Even if the U.S. and Iran transform their relationship, ending the horror in Syria will remain excruciatingly hard. Syria is frighteningly divided along sectarian lines. There are multiple rebel groups. Saudi Arabia, which is terrified of Iranian power, now espouses a far more militantly anti-Assad line than the United States does. But if the U.S., Turkey, Iran, and Russia could come to a common understanding on how to structure Syria’s political transition, perhaps the Saudis might realize the futility of their efforts at promoting rebel military victory. Perhaps they might grasp the danger of prolonging a war that empowers jihadists who—like their hero, Osama bin Laden—may eventually turn their guns on Riyadh.