The U.S. shoots down a Syrian fighter-bomber. Iran launches missiles into eastern Syria. Russia threatens to attack coalition aircraft west of the Euphrates. What is going on?

It might appear a mindless mess, but the outlines are clear. The great Muslim civil war, centered in Syria, is approaching its post-Islamic State phase. It’s the end of the beginning. The parties are maneuvering to shape what comes next.

It’s Europe, 1945, when the war was still raging against Nazi Germany, but everyone already knew the outcome. The maneuvering was largely between the approaching victors — the Soviet Union and the Western democracies — to determine postwar boundaries and spheres of influence.

So it is today in Syria. Everyone knows that the Islamic State is finished. Not that it will disappear as an ideology, insurgency and source of continuing terrorism both in the region and the West. But it will disappear as an independent, organized, territorial entity in the heart of the Middle East.

It is being squeezed out of existence. Its hold on Mosul, its last major redoubt in Iraq, is nearly gone. Raqqa, its stronghold in Syria and de facto capital, is next. When it falls — it is already surrounded on three sides — the caliphate dies.

Much of the fighting today is about who inherits. Take the Syrian jet the United States shot down. It had been attacking a pro-Western Kurdish and Arab force (the Syrian Democratic Forces) not far from Islamic State territory.

Why? Because the Bashar al-Assad regime, backed by Iran, Hezbollah and Russia, having gained the upper hand on the non-jihadist rebels in the Syrian heartland (most notably in Aleppo), feels secure enough to set its sights on eastern Syria. If it hopes to restore its authority over the whole country, it will need to control Raqqa and surrounding Islamic State areas. But the forces near Raqqa are pro-Western and anti-regime. Hence the Syrian fighter-bomber attack.

Hence the U.S. shoot-down. We are protecting our friends. Hence the Russian threats to now target U.S. planes. The Russians are protecting their friends.

On the same day as the shoot-down, Iran launched six surface-to-surface missiles into Syrian territory controlled by the Islamic State. Why? Ostensibly to punish the jihadists for terrorist attacks two weeks ago inside Iran.

Perhaps. But one obvious objective was to demonstrate to Saudi Arabia and the other Sunni Arabs the considerable reach of both Iran’s arms and territorial ambitions.

For Iran, Syria is the key, the central theater of a Shiite-Sunni war for regional hegemony. Iran (which is non-Arab) leads the Shiite side, attended by its Arab auxiliaries — Hezbollah in Lebanon, the Shiite militias in Iraq and the highly penetrated government of Iraq, and Assad’s Alawite regime. (Alawites being a non-Sunni sect, often associated with Shiism.)

Taken together, they comprise a vast arc — the Shiite Crescent — stretching from Iran through Iraq, Syria and Lebanon to the Mediterranean. If consolidated, it gives the Persians a Mediterranean reach they have not had in 2,300 years.

This alliance operates under the patronage and protection of Russia, which supplies the Iranian-allied side with cash, weapons and, since 2015, air cover from its new bases in Syria.

Arrayed on the other side of the great Muslim civil war are the Sunnis, moderate and Western-allied, led by Saudi Arabia, the Gulf states, Egypt and Jordan — with their Great Power patron, the United States, now (post-Obama) back in action.

At stake is consolidation of the Shiite Crescent. It’s already underway. As the Islamic State is driven out of Mosul, Iranian-controlled militias are taking over crucial roads and other strategic assets in western Iraq. Next target: eastern Syria (Raqqa and environs).

Imagine the scenario: a unified Syria under Assad, the ever more pliant client of Iran and Russia; Hezbollah, tip of the Iranian spear, dominant in Lebanon; Iran, the regional arbiter; and Russia, with its Syrian bases, the outside hegemon.

Our preferred outcome is radically different: a loosely federated Syria, partitioned and cantonized, in which Assad might be left in charge of an Alawite rump.

The Iranian-Russian strategy is a nightmare for the entire Sunni Middle East. And for us too. The Pentagon seems bent on preventing it. Hence the cruise missile attack for crossing the chemical red line. Hence the recent fighter-bomber shoot-down.

A reasonable U.S. strategy, given the alternatives. But not without risk. Which is why we need a national debate before we commit too deeply. Perhaps we might squeeze one in amid the national obsession with every James Comey memo-to-self?