On a recent reporting trip to Iraq and northern Syria, two things were made apparent to me — one of them relatively encouraging, the other far less so. The encouraging news is that ISIS is currently in a state of retreat. Not headlong rout, but contraction.

The bad news?

Our single-minded focus on ISIS as if it were the main or sole source of regional dysfunction is the result of faulty analysis, which in turn is producing flawed policy.

Regarding the first issue, 2015 was not a particularly good year for ISIS. In the course of it, the jihadis lost Kobani and then a large area to its east, bringing the Syrian Kurdish fighters of the YPG and their allies to within 30 km of the Caliphate’s “capital” in Raqqa city.

In late December, the jihadis lost the last bridge over the Euphrates that they controlled, at the Tishreen Dam. This matters because it isolates Raqqa, making it difficult for the Islamic State to rush reinforcements from Aleppo province to the city in the event of an attack.

Similarly, the Kurdish YPG advanced south of the town of al-Hawl to Raqqa’s east.

In Iraq, the Iraqi Shia militias and government forces have now recaptured Ramadi city (lost earlier in 2015) following the expulsion of ISIS from Tikrit and Baiji.

The Kurdish Pesh Merga, meanwhile, have revenged the humiliation they suffered at the hands of ISIS in the summer of 2014. The Kurds have now driven the jihadis back across the plain between Erbil and Mosul, bringing them to the banks of the Tigris river. They have also liberated the town of Sinjar.

The city of Mosul nestles on the western side of the river. It remains ISIS’s most substantial conquest. Its recapture does not appear immediately imminent, yet the general trend has been clear. The main slogan of ISIS is “Baqiya wa’tatamaddad,” “Remaining and Expanding.” At the present time, however, the Islamic State may be said to be remaining, but retreating.

This situation is reflected in the confidence of the fighters facing ISIS along the long front line. In interviews as I traversed the lines, I heard the same details again and again regarding changing ISIS tactics, all clearly designed to preserve manpower.

This stalling of the Islamic State is the background to their turn towards international terror, which was also a notable element of the latter half of 2015. The downing of the Russian airliner in October, the events in Paris in November, and the series of suicide bombings in Turkey since July attest to a need that the Islamic State has for achievement and for action. They need to keep the flow of recruits coming and to maintain the image of victory essential to it.

Regarding the second issue: seen from close up, the Islamic State is very obviously only a part, and not necessarily the main part, of a much larger problem. When talking both with those fighting with ISIS and with those who sympathize with it in the region, this observation stands out as a stark difference in perception between the Middle Eastern view of ISIS and the view of it presented in Western media. The latter tends to present ISIS as a strange and unique development, a dreadfully evil organization of unclear origins, which is the natural enemy of all mainstream forces in the Middle East.

From closer up, the situation looks rather different.

ISIS has the same ideological roots and similar practices as other Salafi jihadi organizations active in the Syrian arena. ISIS treats non-Muslims brutally in the areas it controls, and adheres to a rigid and fanatical ideology based on a literalist interpretation and application of religious texts. But this description also applies to Jabhat al-Nusra, the al-Qaeda franchise in Syria.

Nusra opposes ISIS, and is part of a rebel alliance supported by Saudi Arabia, Qatar, and Turkey. In March 2015, when Nusra captured Idleb City in northern Syria, the city’s 150 Christian families were forced to flee to Turkey. Nusra has also forcibly converted a small Druze community in Idleb. The alliance Nusra was a part of also included Muslim Brotherhood-oriented groups, such as the Faylaq al-Sham militia, which apparently had no problem operating alongside the jihadis.

ISIS is not a unique organization; rather, it exists at one of the most extreme points along a continuum of movements committed to Sunni political Islam.

Meanwhile, the inchoate mass of Sunni Islamist groups — of which ISIS constitutes a single component — is engaged in a region-wide struggle with a much more centralized bloc of states and movements organized around the Islamic Republic of Iran, which is committed to a Shia version of political Islam.

The Middle East — in Yemen, Iraq, Syria, and to a lesser extent Lebanon, all along the sectarian faultline of the region — is witnessing a clash between rival models of political Islam, of which ISIS is but a single manifestation.

The local players find sponsorship and support from powerful regional states, themselves committed to various different versions of political Islam: Iran for the Shias; Saudi Arabia, Turkey, and Muslim Brotherhood-supporting Qatar for the Sunnis.

The long awakening of political Islam as the dominant form of popular politics in the Middle East started decades ago. But the eclipse of the political order in the region, and of the nationalist dictatorships in Iraq, Syria, Egypt (temporarily), Tunisia, and Yemen in recent years, has brought it to a new level of intensity.

States, indifferent to any norms and rules, using terror and subversion to advance their interests, jihadi armed groups, and the refugee crises and disorder that result from all this are the practical manifestations of it.

This, and not the fate of a single, fairly ramshackle jihadi entity in the badlands of eastern Syria and western Iraq, is the matter at hand in the Middle East.