The State Department announced early this month that U.S. and Turkish military delegations had reached an agreement on establishing a safe area in northern Syria for refugees fleeing the fighting that has devastated that country since 2011.

One major problem with this agreement is that the proposed zone would be detached from territory now controlled by Syria’s Kurdish militias, which have been operating under the umbrella of the Syrian Democratic Forces. Washington sees the Kurdish militias as key allies against ISIS, but Ankara regards them as enablers of the Turkish Kurd separatists that have been battling with Turkey since the 1980s.

The announcement omitted any meaningful details, such as key parameters for the zone or who will be in charge of actually maintaining security within the area. Perhaps that should not be too surprising. After all, the problem the agreement seeks to resolve is excruciatingly complex and impervious to easy answers or quick solutions.

Upwards of four million Syrian refugees have flooded into Turkey. Turkey wants to establish a safe area so it can start to relocate refugees, easing the strain it has put on Turkey’s domestic resources, not to mention the political problems it would rather not have. But in Turkey’s calculations, the safe zone doubles as an opportunity to push the Syrian Kurds farther away from Turkey’s border, thus making it harder for some monolithic Kurdish entity to assert itself in claiming Turkey’s eastern lands. So the agreement represents a potential double-win for Turkey, but at the expense of the Kurds.

The Kurds are beset on all sides. The Turks view them as terrorists who seek to carve out a homeland that would claim a part of Turkey; the government of Syria views them in a similar way, an obstacle to Bashar Al-Assad’s complete control of the country that he has vowed to reclaim “every inch” of.

Competitors within the region include what remains of the Islamic State, lethal elements of Al Qaeda, large numbers of opposition fighters from other Islamist extremist groups, Iranian troublemakers, and pro-Iranian militias (including Hezbollah operatives). All of these players battle constantly for control of what little working infrastructure remains, with the Kurds caught in the middle.

The United States wants to relieve suffering and prevent the Kurds from being exterminated. But the United States is also practical and fully cognizant that the Kurds are good fighters and the most effective local means through which to attack terror groups that pose a threat to U.S. interests.

As for the Syrian Kurds, their survival is at stake and can only be secured by maintaining an effective claim on a homeland that, by its nature, sustains the “threat” perceived by all of the other actors in this bloody play.

The lack of agreement on who will do what to create and maintain this safe zone also highlights the complexity of the U.S.-Turkey relationship. Both are members of NATO and the United States depends on the use of military facilities hosted by the Turks. Yet Turkey has pushed forward in acquiring the advanced S-400 air defense radar/missile system from Russia in spite of U.S. concerns about the threat it poses to America’s newest fighter jet program, the F-35. Turkey has been a part of the program since its beginning and was slated to receive one hundred fighters. But now, Turkey has been barred from acquiring the fighter jets or participating in the production of components for the F-35 program.

So what to do? That Syria’s refugees need a sanctuary as long as the civil war rages is a given. And the Kurds are valuable partners in America’s efforts to fight ISIS and contain Iranian influence. Washington should not allow them to fall prey to Syria’s brutal regime or its Iranian backers.

The United States cannot completely quit the region because of the larger security risks presented by an assortment of terrorist groups and Iran’s designs to entrench itself in Syria and open up a new front on the borders of Israel. The United States should seek to mediate between Turkey and Syrian Kurds, just as it played a role in fostering better relations between Turkey and Iraqi Kurds.

As frustrating, drawn-out, and unsatisfactory as all of this is, a “least bad” outcome is far preferable to slaughter, ethnic cleansing, broken alliances, and a region plunged deeper into chaos. That’s the nature of intractable problems; it is often the nature of regional relations, and it highlights the importance of patient, focused, and artful diplomacy.

Dakota L. Wood is a senior research fellow in The Heritage Foundation’s Center for National Defense. James Phillips is the senior research fellow for Middle Eastern affairs in the think tank’s Allison Center for Foreign Policy Studies.

Image: Reuters