There's one thing, and maybe one thing only, that American leaders agree on when it comes to the Middle East: The Kurds are our best friends against ISIS.

There's a reason for that: Kurdish forces are dedicated, dependable, and successful. In Iraq, Kurdish forces have cut ISIS supply lines in the country's north, laying the groundwork for an Iraqi government assault on ISIS-held Mosul. In Syria, Kurdish forces have moved to within 30 miles of ISIS's de facto capital, Raqqa.

But as ISIS recedes, America's alliance with the Kurds becomes less necessary for either side. And it's coming as American and Kurdish interests increasingly diverge — and as the two allies push for visions of the Middle East that are more than a little different.

The ISIS threat binds the US and the Kurds — but it's waning

The United States has had a longstanding relationship with Iraq's quasi-autonomous Kurdish minority, who benefited from the American-led no-fly zone over Iraq after the 1990s Gulf War and from Saddam Hussein's downfall in 2003. But that relationship got considerably closer in 2014 when the US partnered with Iraqi and Syrian Kurds to fight their shared enemy, ISIS.

For the Americans, the Kurds were obvious allies. Unlike, say, the Iraqi army, the Kurds are strong and reliable fighters. Unlike with Syrian rebel groups, there is little concern of arms or money going to extremists.

This alliance has worked well. It's helped Syrian and Iraqi Kurds protect their territory from ISIS. And it's helped the US lead an anti-ISIS effort that has seen the group lose 30 percent of its territory since August 2014, according to a US estimate.

But this was always an alliance of convenience. Whereas the US wants to defeat ISIS as part of a larger effort to return stability to the Middle East, Iraqi and Syrian Kurds are mostly focused on protecting their own populations and territory. Those two objectives overlap today, but as ISIS recedes, so does the rationale for the US-Kurdish alliance.

Reporters on the ground indicate that ISIS is indeed collapsing. ISIS is "a rapidly diminishing force," the Washington Post's Liz Sly wrote in a late March piece. "Front-line commanders no longer speak of a scarily formidable foe but of Islamic State defenses that crumble within days and fighters who flee at the first sign they are under attack."

This isn't to say that ISIS is going to collapse tomorrow, or even stop being a real threat to the Kurds anytime soon. Rather, it's to say that ISIS is getting significantly weaker — and the more this continues, the less of a threat it will be, and the less of a priority it will become for Kurds and other regional powers.

So what does that mean for the US and the Kurds?

The Iraq flashpoint: Kirkuk

The status of the Kurds in post-Saddam Iraq has never totally been settled. Repressed and slaughtered by Saddam's government, the Kurds demanded — and received — a significant degree of autonomy after his fall, including their own regional government and military.

But they also claim some Iraqi territory that is not part of the semi-autonomous Kurdish region — including the oil-rich city of Kirkuk, which Kurds consider to be historically Kurdish. As least 13 percent of all Iraqi oil reserves are in the Kirkuk area — enough to make or break the Kurdistan Regional Government's (KRG) financial viability should it ever become an independent state.

In June 2014, while the Iraqi government was preoccupied with fighting ISIS, the Kurds simply seized Kirkuk, along with some other territories it considered rightfully Kurdish, and has controlled them ever since.

"It's like [Israel] taking East Jerusalem in 1967," Kirk Sowell, an expert on Iraqi politics at the Utica Risk Services consulting group, said of the Kirkuk seizure at the time.

But the Iraqi government — and the Shia militias fighting alongside it — see this as an unconstitutional power grab. Moreover, it looks like a possible prelude to Kurdish secession, taking all the Kirkuk oil with them. This isn't mere paranoia: The KRG has announced intentions to hold a referendum in October on whether it should leave Iraq.

The stage is set, then, for a major political crisis between Iraq's central government and Iraqi Kurdistan. There's already been some actual blood spilled: In November 2015, Shia militias clashed with Kurdish peshmerga for 10 days in the Kirkuk area. The Guardian's Martin Chulov described it as "the most serious flare-up with the Kurds anywhere in Iraq in the 12 years since the fall of Baghdad."

"We will never accept the Kurds taking Kirkuk," Mu’en al-Khadimi, a spokesperson for the Badr Brigades militia group, told Chulov. KRG President Masoud Barzani sounded a similarly strident note in comments to Chulov: "We will fight to the last person and we will not let anyone else control Kirkuk."

A political or even armed conflict between the Iraqi government and Iraqi Kurds would seriously distract from the fight against ISIS, which Baghdad is already barely equipped to fight, and would risk dividing the Iraqi factions are who currently united against ISIS.

Such a conflict would be good news for ISIS and bad news for everyone else, including the US, whose anti-ISIS strategy requires Iraqi Arabs and Kurds to work together.

The Syria flashpoint: Rojava

The Syrian Kurds operate under completely different political auspices than their Iraqi brethren. But they, too, aspire to autonomy — specifically in the Kurdish-majority territories in Syria's north, which they call Rojava. And, as in Iraq, this could seriously complicate US strategy and interests.

Rojava has essentially functioned as an independent state since late 2012, when Syrian leader Bashar al-Assad withdrew from the region to fight the mostly Arab rebels. As Syrian Kurds have grown stronger, they've been natural US allies: They fight ISIS, oppose Assad, and aren't mixed up with jihadists.

But the rise of Syria's Kurds has alarmed another American ally: Turkey, which fears that this could aid or embolden the Kurdish insurgency within its own country, especially the Kurdistan Workers' Party (PKK).

The PKK is a Kurdish nationalist group founded in 1978 that seeks autonomy for Turkey's ethnic Kurdish minority. Over the past decades, fighting between the PKK and Turkey has killed about 40,000 people, with violence peaking in the 1990s. Rojava borders the Turkey's Kurdish regions, and Syrian Kurds have close political links with the PKK.

In 2012, the Turkey-PKK conflict was cooling off; there was actually an active and promising peace process. But the PYD's surge in Syria "changed the game, for Turkey and for Kurds," Atlantic Council Turkey expert Aaron Stein told me last year. Turkey worried that Syrian Kurds would inspire Kurdish nationalism in Turkey and that Turkish Kurds would use this de facto mini state as a base of operation.

In July 2015, as the US was encouraging along Syrian Kurdish advances, PKK-Turkish tensions erupted into low-level warfare that has gone on since then. Unsurprisingly, this became a source of tension between the US and Turkey, which allows the US to use its military bases.

"Are you on our side or the side of the terrorist PYD and PKK organizations?" Turkish President Recep Tayyip Erdogan asked rhetorically in a February 2016 speech. "Hey, America. Because you never recognized them as a terrorist group, the region has turned into a sea of blood."

Incurring Turkish anger over supporting Syrian Kurds was almost certainly the right trade-off, given how successful they've been against ISIS. But it was a trade-off nonetheless, with real costs.

This is going to get harder as the US attempts to push a negotiated settlement to end Syria's war. Turkey is deeply hostile to any independent or autonomous Rojava: One of its principal goals in Syria is preventing that. But a free Rojava is Syrian Kurds' fundamental demand. Two critical American allies have diametrically opposed interests in Syria.

This tension is already causing problems. The Syrian Kurds have been excluded from the Syrian peace talks. This March, while talks were underway, they declared Rojava an autonomous federal state inside of Syria. "We've been fighting ISIS for you," the Kurds are saying to America, "and we're not going anywhere."

But, as in Iraq, the US only needs Syria's Kurds for as long as we're fighting ISIS. The weaker ISIS becomes, the less our interests overlap. Indeed, some Kurdish forces have already fought US-backed Syrian rebels in northwestern Syria in a bid to expand their territory there.

The Kurds are not America's cute sidekicks

The Kurds are extremely reliable and brave partners in the war against ISIS, and they have earned every ounce of the admiration they get from American officials and politicians. But that doesn't mean they share America's goals or vision for the region. Kurdistan is not America East.

Their position is eminently reasonable: They've been viciously repressed, on account of being a weak minority. The only way they can really protect themselves is to control their own territory.

But the other parties in Iraq and Syria, too, have legitimate interests. The Iraqi government, for example, already grants the Kurds significant autonomy. From their point of view, the Kurds are trying to take oil reserves that all of Iraq should share, depriving Iraqis of resources they desperately need to reconstruct their country after the one-two blow of the US invasion and ISIS war.

For all that America has benefited from working with the Kurds, it has a responsibility to think about regional interests beyond just those of the Kurds. That's a necessity if it wants the Middle East to ever become stable again.

For the past two years, the United States has (understandably!) focused overwhelmingly on defeating the Islamic State. But now that the group is collapsing, the US needs to start thinking about the day after ISIS falls, whenever that finally comes.

The Kurds are political actors with their own interests and concerns, which they will pursue even if Washington doesn't like it. American leaders, especially people who might be president one day, need to understand this, and they need to start thinking about what to do when the Kurds inevitably begin pursuing interest that are counter to our own — how they'll prevent the cycle of zero-sum sectarian conflict from continuing.

The rise of ISIS explained in six minutes