The borders of the Islamic State's "caliphate" are shrinking fast.
Isis' strongholds in Iraq and Syria are collapsing one by one. The US-led war has reached a point where questions are being raised about what comes next.
So far, the answer seems likely to be: more war.
That's partly because the US strategy for defeating Isis relies on a variety of regional allies and local armed groups who are often bitterly at odds.
Though all of them regard Isis as an enemy, most of them regard one another as enemies, too. As they conquer territory from the militants, they are staking out claims to the captured lands in ways that risk bringing them into conflict with others who are also seizing territory. New wars are brewing, for control of the post-Isis order.
Here is a list of 10 of them, in no particular order. There are doubtless more. Some have already started. Others may never happen. But any one of them could increase Isis' chances of survival, perpetuating the conditions that enabled the group to thrive - and perhaps entangling the US in the region for many years to come.
WAR NO. 1: US-backed Syrian Kurdish forces and Turkish-backed Arab forces.
This is one of the wars that have already started, and it is also one of the more complicated ones. Turkey, which is fighting a war at home against separatist Turkish Kurds, has watched with alarm as Syrian Kurds have capitalised on US support to expand Kurdish control over northeastern Syria. Syrian Arab rebels allied to Turkey are also opposed to the Kurdish expansion, which is encroaching on Arab areas. So when Turkey intervened in Syria two weeks ago to help Syrian rebels capture Isis territory, it was clear that the Kurds were as much of a target as Isis. Fighting has since erupted, and though the US has asked both sides to stop, it is unclear whether the it has enough leverage over its rival allies to prevent a deepening conflict.
WAR NO. 2: Turkey and the Syrian Kurds.
This war would be similar to war No. 1, but bigger. For now, Turkey has confined its incursion into Syria to an area of Syria occupied by Isis that is mostly Arab. But Turkey is just as worried about the de facto Kurdish state emerging along its border farther east. Kurds declared an autonomous region there earlier this year, and Turkey is now building a wall along the border to try to seal it off. If the tensions persist, a direct Turkish invasion of the Kurdish area - where a small number of US troops also are based - can't be ruled out.
WAR NO. 3: Syrian Kurds and the Syrian government.
The Syrian Government also feels threatened by the territorial ambitions of the Kurds. Until recently, they had maintained an uneasy alliance, and Syrian President Bashar al-Assad boasted on a number of occasions that his government provides the Kurds with arms. But the relationship has soured since the autonomy declaration by the Kurds, and the two sides have fought brief battles in areas where they both have forces.
There is now a ceasefire, but the Kurdish aspirations to self-rule are directly at odds with Assad's proclaimed goal of reasserting Syrian sovereignty over the whole country.
WAR NO. 4: The United States and Syria.
This is a war that could have erupted on any number of occasions in the five years since President Barack Obama called for the ouster of Assad. That it hasn't is testimony to how much both sides want to avoid conflict. It still seems extremely unlikely. But there are a few front lines where the Isis war could at some point bring US-backed groups into direct conflict with Syrian government forces. Among them is Isis' Syrian capital, Raqqa, where in June the United States and Syria were both backing rival offensives from opposite directions. Last month, the US military scrambled jets to deter Syrian warplanes from bombing the Kurds.
WAR NO. 5: Turkey and Syria.
The Turkish intervention in Syria has for now been confined to fighting Isis and Kurdish forces. Turkey has also taken steps to mend fences with both Russia and Iran, Assad's most important allies, who appear to have given a green light to Turkey's intervention in northern Syria.
If Turkey's fight against Isis goes well, however, the Turkish forces will soon find themselves up against Syrian Government front lines around the contested city of Aleppo. That could get messy.
WAR NO. 6: Iraqi Kurds and the Iraqi Government.
Moving east from Syria along Isis' dwindling borders into Iraq, the situation is somewhat less immediately volatile. But it is no less complicated - or dangerous. Just as Syrian Kurds have expanded the areas that are under their control in ways that challenge the Syrian Government's sovereignty, so too have Iraqi Kurds moved into areas of Iraq that were once under Iraqi government control. The US-backed Iraqi Government says it intends to reclaim these areas once Isis has been fully vanquished. The US-backed Kurds have said they won't let go of any territory Kurds have shed blood to conquer.
These disputes predate the existence of Isis, but they will re emerge with a vengeance once the militants are defeated.
WAR NO. 7: Iraqi Kurds and Shia militias.
This would take place for reasons similar to war No. 6, except that it has already started to simmer. Shia militias, many of them backed by Iran, have taken a leading role in some of the conquests of Isis territory, pushing north from Baghdad to drive the militants back. They have come up against US-allied Kurdish peshmerga fighters pressing south from the Kurdish areas. In at least one location, Tuz Khurmatu, clashes have already taken place.
But, the Kurds themselves are not united, either in Syria or Iraq, which gives rise to the possibility of:
WAR NO. 8: Kurds against Kurds.
This is perhaps the most complicated of all the scenarios, but it is far from unlikely. The Kurds are bitterly divided among themselves over just about everything except their aspirations to a Kurdish state. The Kurds of Iraq are split between two factions that fought a bloody civil war in the 1990s. One of them is a sworn foe of the Kurds who control northern Syria. The other is allied to the Syrian Kurds - who themselves are far from united. Conflict between US-allied Kurdish groups is possible, in Iraq or Syria or both.
WAR NO. 9: Sunni Arabs against Shias and/or Kurds.
In pursuit of the goal of defeating Isis, towns and villages that are predominantly Sunni are being conquered by forces that are mostly Kurdish or Shia. Many Sunnis are teaming up with them to help defeat the militants. Many are overwhelmingly relieved when their oppressors are driven out.
But there are also reports of abuses by Shias and Kurds against the Sunni communities they liberate. These include the forced displacement of Sunnis from their homes and mass detentions of Sunni men. In the absence of genuine reconciliation, including political solutions that empower Sunnis, a new form of Sunni insurgency could emerge.
WAR NO. 10: The remnants of Isis against everyone.
Isis still controls a big chunk of territory in Syria and Iraq. Offensives to control its twin capitals, Mosul and Raqqa, have yet to begin. If the groups who are supposed to participate in the offensives fight among themselves, those battles could be delayed indefinitely.
Even if they don't, these other conflicts, left unresolved, will herald long-term instability in the region. Military gains are not being matched by political solutions to the wider chaos and dysfunction that enabled the rise of Isis in the first place. If the current war begets new wars, the Islamic State may yet endure.