On August 28, 2017, the Iraqi army announced the complete liberation of the city of Tal ʿAfar after a relatively swift, week-long battle with the Islamic State (IS). This predominantly ethnic Turkmen city, once considered a stronghold of the IS, had been under siege by Shiʿi militias (“Hashd al-Shaʾbi”; Popular Mobilization Units) since March. Before launching the battle, the Iraqi government clarified that only government forces (army, counterterrorism divisions, and federal police) would storm the city and that the Shiʿi militias would serve in auxiliary functions only. Nevertheless, for the first time in the battles against the IS, the Hashd took an active role. The original number of IS fighters in Tal ʿAfar is not known (estimates were between 1,000 and 2,000), but those who remained did not offer much resistance to the government offensive to retake the city. Some of them withdrew to the nearby town ʿIwadiya, which was also taken in late August, while others managed to escape to Syria.
While territory controlled and governed by the Islamic State has been drastically reduced since 2015, particularly in Iraq, little attention has been given to the fact the IS still controls two enclaves: the towns of Rawa, ʿAnah, and al-Qaʾim in westernmost part of Anbar province on the border with Syria; and the enclave around Hawija, west of Kirkuk.
In Syria, the IS is still holding a relatively vast and contingent area from Albukamal on the Iraqi border in the east to the periphery of Homs, including the desert towns of Mayadin and al-Hamima. The city of al-Raqqa, in the north of this area and considered to be IS’s “capital” city, is currently under attack by a joint force made up of Syrian rebels and Kurdish militias and backed by the U.S.-led coalition, including its air power. So far, this force’s achievements have been modest, the fighting has been protracted and the city center is still under IS control. However, al-Raqqa’s fall to the coalition is just a matter of time. The IS is also facing increasing pressure from the Syrian Arab Army, which, with the help of Russian air strikes, has lifted the siege on Deir al-Zor and retaken the western part of the city.
The loss of territory has necessitated an administrative change in the IS. The area stretching from the west of the Iraqi province Anbar to Deir al-Zor in Syria (Wilayat al-Khair) was recently made the center of its self-proclaimed Caliphate. This is the only IS province that includes territory on both sides of the Syrian-Iraqi border, and it is believed that the IS leadership has found refuge there. Iraqi scholars who follow the IS claim that since the early days of the Caliphate’s establishment in 2014, the towns of Albukamal (in Syria) and Karabla (in Iraq), both in Wilayat al-Khayr, served as secret capitals of the organization,  and were being used as headquarters for meetings of the leadership. Apparently, the secret capitals were recently given “official” status. Another significant change was the declaration of a new province in Iraq in May 2017, Wilayat al-Jabl, in the hilly Jabl Hamrin and Jabl Makhul region between the provinces of Salah al Din, Diyala, Kirkuk, and Nineveh (Mosul). The IS is entrenched in this hilly area and uses it for training, storage, and as a base for launching attacks on enemy forces in the nearby provinces.
In addition to the loss of territory, the IS has lost, over the last two years, almost all of its top military commanders, including almost all of those who had served in Saddam Hussein’s army and security services. These men were the backbone of the IS and its military capabilities. In their absence, persons with no formal military training and second rank activists were promoted. The top leadership of the organization, below the “Caliph” Abu Bakr al-Baghdadi, now includes only one former Iraqi officer, Ayad al-Jumaili and two persons with no military background (a Saudi and a Jordanian). This loss hampers the IS’s ability to organize large scale military operations. Similarly, the loss of IS spokesman Abu Muhammad al-ʿAdnani has resulted in a deterioration in the quantity and quality of IS media production.
In fact, the IS’s only recent success has been its ability to preserve its top leaders. Abu Bakr al-Baghdadi and others fled Mosul, apparently as early as October 2016. Baghdadi took refuge first in Biʿaj, close to the border with Syria, where he was protected by four small tribes and then, when the Shiʿi Hashd forces approached the town, he was taken to Syria. It is believed that Baghdadi and the top IS leadership are now in the Albukamal area. This further strengthens the claim that this area is currently the capital of the IS; it will likely be their last stronghold in the Middle East.
The two remaining enclaves in Iraq are areas where the IS had some local support. This was also the case for Tal ʿAfar, where all the IS commanders were locals. In contrast, almost all of the IS commanders in Mosul were foreigners, particularly Russian speaking Muslims from the former Soviet republics. The IS generally appointed officials without consideration for their places of origin, which added to the local indignation in Mosul, and contributed to its defeat there.
In the wake of these developments, IS’s days as a sovereign authority in parts of Iraq are clearly numbered. Iraqi government forces are now preparing to liberate what remains of the IS presence in Iraq. It appears that liberating Hawija and west of Sharqat will be next; they lie in the center of Iraq, close to the main cities. Even in Syria, where the IS still controls a significant swath of territory, and with no effective state power to challenge it, most of its territory is unpopulated, seriously reducing the potential income that it can generate from taxes.
As an organization defined by its ideology, the failure of the Caliphate will undoubtedly have serious consequences for the future of the IS. Like other messianic and apocalyptic movements, failure creates frustration and leads to the eventual de-legitimization of the original idea. This may happen in stages.
In the short term, the IS may survive as a terrorist and guerilla organization. In an attempt to explain the defeat and the loss of its territories, IS spokesmen attempt to draw lessons from the experience and praise the return to its origins, when it emerged from the desert areas of Iraq. Another part of the current readjustment is the reactivation of branches like Wilayat al-Janub (“The Southern Province”) and sleeper cells all over Iraq to carry out attacks in places that have yet to be targeted by the Islamic State. Yet many of these networks have already been uncovered by the Iraqi security services. The IS may be able to carry out terrorist attacks elsewhere in the world, but the complexity and level of sophistication of these operations is likely to decline and future attacks may well be inspired, and not so much directed by the Islamic State.
The survival of the IS will continue to pose a challenge to the Iraqi state. The wide desert areas in many parts of the country are very difficult to control and so is the hilly region of Hamrin and Makhul, south of Kirkuk. IS may use these areas to regroup and launch attacks on neighboring areas.
Another challenge is the open border between Iraq and Syria. Almost all of Iraq’s international borders are now effectively controlled by the central government. This is the case of the borders with Turkey, Iran, Kuwait, and Jordan. Iraq and Saudi Arabia are building a sophisticated barrier along their border to prevent the movement of jihadi fighters between the two countries. Only the Syrian-Iraqi border remains open to the IS. For the IS, this border is not only a strategic lifeline connecting its supporters but a symbol of its success. Shortly after taking Mosul in June 2014, the IS distributed two propaganda videos in which a bulldozer is shown destroying the so-called “Sykes-Picot border” between Syria and Iraq. If this border can be re-established, the IS’s lifeline will be cut and part of its revolutionary legacy will be undone.
Ronen Zeidel is a Researcher at the Moshe Dayan Center for Middle Eastern and African Studies (MDC), Tel Aviv University (TAU).
 Muhammad al-Salihi, “al-‘Amaliyat al-Mushtarika Tastamir fi Tathir Talʾafar wa Khasaaʾir Daʾesh Tatazayid” (“The Joint Operations Continue to Purge Tal’afar and Da’esh’s Losses Increase”), Azzaman August 22, 2017. The Iraqi units involved were thus called “the joint forces” (al-Quwat al-Mushtarika), which included 12 brigades of the Hashd forces.
 Hisham al-Hashimi, “Nainawa bayn Nasrain: al-Mawsil wa Tal’afar”(“Nineveh between Two Victories: Mosul and Tal ʿAfar”) Huffington Post, August 29, 2017; Hashimi and others explore the possibility of an international deal, possibly involving Turkey and even Iran and Hizballah, which allegedly helped “IS commanders leave the city.
 Muhamad al-Salihi, al-Quwat al-Mushtarika Tasif al-Ma’arik bil-Malhama al-Tarikhiyya wa Tata’ahid bil-Qadaa ʿala Daʾesh (“The Joint Forces Describe the Battle as a Historical Epos and Promises an End to Daʿesh”), Azzaman, August 20, 2017.
 Personal communication with an Iraqi scholar, August 21, 2017.
 Daʿesh Yuʾasis “Wilayat al-Jabl” Li Muhajamat 4 Muhafathat (“Daʿesh Forms Wilayat al-Jabl to Attack 4 Provinces”), al-Mada, May 30, 2017.
 Biʿaj was taken by the Hashd in June 2017.
 https://www.facebook.com/hisham.alhashimi.16/posts/1545133088872244 accessed August 21, 2017.
 In fact, the Iraqi-Syrian border does not even slightly resemble the borders set by “Sykes-Picot” agreement in 1916. The final border between the two countries was drafted in 1922.