Ayman al-Zawahiri was correct. Believed to be ensconced in the tribal lands of Pakistan, the leader of what’s sometimes called al Qaeda Central has dedicated his life to a jihad that he hopes and prays will lead to the founding of a new and mighty Islamic empire. But he understands the value of strategic patience.

In particular, he recognized that establishing a caliphate before conditions were favorable for its survival and expansion could only be unhelpful, causing Muslims to doubt whether spreading Islamic domination in the 21st century is a divinely blessed mission.

By contrast, Abu Bakr al-Baghdadi, 45, has been a young man in a hurry. As leader of al Qaeda in Iraq, he chafed at taking orders from the 65-year-old successor to Osama bin Laden. In 2014, he broke with al Qaeda, declared a caliphate, the Islamic State, with himself as caliph. And now he and his fledgling empire are in peril.

A coalition of forces is closing in on Mosul, the only major Sunni-majority city in Iraq still under Islamic State control. It is probably only a matter of time — and blood — before Mosul is liberated, a term that should be used advisedly in the Middle East.

The Islamic State is believed to have fewer than 7,000 fighters in Mosul. How many will seek martyrdom (after using human shields for as long as possible) and how many will run from the more than 30,000 coalition troops — troops much better equipped and supported by American air power? Hard to say.

Those who flee may head for towns along the Tigris and Euphrates rivers that remain Islamic State strongholds. Others will try to reach Syria, especially Raqqa, the caliphate’s de facto capital, northeast of Damascus.

An offensive against Raqqa is being contemplated. But who will lead that effort? And who will govern Raqqa after the Islamic State is gone? These are difficult questions that ought to be answered within a broader strategic framework.

Imagine that the Battle of Mosul is followed by a Battle of Raqqa and that the Islamic State ends up with little or no territory still under its control. What do its surviving fighters do then? Perhaps some will slink back to wherever they came from, defeated and disillusioned. Others may become guerrillas, perpetrating acts of terrorism within the region and plotting a comeback. Still others could decide to put their skills and experience to use in a more distant land, perhaps one that mistakes them for refugees.

We don’t know how much destruction will be visited on Mosul over the days ahead, but it’s likely that hundreds of thousands of people will be displaced. The agencies charged with caring for them are already burdened to the breaking point.

Mosul and the nearby Nineveh Plain are the historic homeland of the Assyrian Christians. The U.S. Congress, the Obama administration and the U.S. Commission on International Religious Freedom have all recognized that these and other Christian communities of the Middle East, as well as Yazidis and other religious minorities, are facing genocide. Such recognition should guarantee that saving Christians and their communities is a high priority. That does not appear to be the case at present. It’s easy to champion diversity for Washington, Toronto and Berlin. To do so for Muslim-majority lands is more challenging.

Though the forces assembled for the Battle of Mosul view the Islamic State as their common enemy, their alliance remains tenuous. The Peshmerga, the army of Iraqi Kurdistan, is constituted of tough fighters whose most important mission is consolidating and defending historically Kurdish lands. Elements of the Iraqi military are reportedly flying Shia flags, a sight not reassuring to Mosul’s Sunnis. Also joining the coalition are Popular Mobilization Forces, Shia militias, the most powerful of which are controlled by Iran. Just a few years ago, they were killing American troops, using such weapons as EFPs, explosively formed penetrators — highly lethal bombs supplied by Iran’s ruling mullahs.

If the Battle of Mosul goes as expected, the Islamic State’s loss, while significant, also will be al Qaeda’s gain. Dr. Zawahiri (he was a physician before he was a revolutionary) should have an easier time attracting recruits and funds once it becomes indisputable that the rival founded by Dr. Baghdadi (he was a theologian before he was a revolutionary) has not lived up to its promise.

Also benefiting from the decline of the Islamic State will be the Islamic Republic of Iran, which aims to establish a new Persian empire, albeit one based on religious allegiance. Most immediately, the clerical regime is attempting to construct what has been called a “Shia crescent” including Iraq, where its influence has only grown since the 2011 withdrawal of American troops, and Syria, where it is defending the dictatorship of its client, Bashar Assad (with significant Russian assistance). Beyond Syria is Lebanon, where Hezbollah, Iran’s foreign legion, is more powerful than the national armed forces and is preparing for a future showdown with Israel. In addition, Iran provides support to Houthis fighting a civil war in Yemen, and to Hamas in Gaza.

So while the Battle of Mosul is likely to be a military victory for the alliance President Obama supports, it would be unwise for him to claim — once again — that “the tide of war is receding.” The free peoples of the world, as well as those who might like to be, are in for an extended conflict, one that will have to be fought on multiple battlefields against a list of jihadi groups and regimes. Perhaps the next American administration will develop a serious strategy to defeat our enemies. I’m not suggesting that’s probable, only that it’s not impossible.