ISIS is on the run again, but is it really the beginning of the end? Will McCants and Craig Whiteside look at the 2008 to 2011 period when the group's predecessors went to ground in Iraq and draw lessons for how the group might behave this time. This post originally appeared on Lawfare .

In one of his last messages before he was killed by a U.S. drone strike, the Islamic State’s spokesman Abu Muhammad al-Adnani prepared the group’s followers for ruin. After the group lost half its territory in Iraq and a fourth of its territory in Syria, Adnani acknowledged that the Islamic State’s government could crumble. But, he proclaimed, we began “in the desert without cities and without territory” and in the desert we can revive once again.

William McCants Former Brookings Expert Public Policy Manager - Google C Craig Whiteside Associate Professor - Naval War College in Monterey, California

It is not an empty boast. The U.S. and Iraqi militaries, together with their Sunni tribal allies, decimated the Islamic State’s insurgency in 2008, which forced the group to go to ground. Yet it emerged four years later as one of the most capable and effective militias fighting in Syria and Iraq. Its success was not simply the result of security vacuums or disenfranchised Arabs. It was also the result of careful preparation during four years in the wilderness.

In its previous incarnation, the Islamic State’s insurgency failed because it alienated its core constituency, the Sunni Arab tribes. It killed young tribesmen who worked with American troops, touching off tribal feuds. It harassed Sunni civilians, forcing women to wear the full veil and breaking the fingers of those who refused to stop smoking. And, most consequentially, it cut into the illicit profits of the tribal shaykhs. Several of these shaykhs decided to work with American troops to defeat the Islamic State.

Once defeated, the Islamic State set about remedying its mistakes by enculturating or coopting the tribes. Islamic State members proselytized among the tribes, seeking to educate Sunni youth about the duty of fighting heresy and unbelief. And it took sides in tribal disputes or bribed tribal leaders to bring them onside—a tactic the Americans had used to great effect, as Islamic State members frankly admitted. The Islamic State didn’t abandon its brutal methods—it killed at least a thousand tribesmen associated with the Sunni awakenings who refused to reform or repent (the actual body count may be over two thousand). But it now had both carrots and sticks to bring the rambunctious tribes to heel.

If the Islamic State’s government collapses, it will go to ground again.

While the Islamic State retooled its tribal policy, it also addressed its other major problem: lack of personnel. Hundreds of Islamic State fighters had been killed or captured and its leadership was decimated. By the end of 2008, the organization could only kill 500 civilians a month, from a high of 2,500 the previous year.

To attract new soldiers, the Islamic State had to demonstrate that it was still in the fight. In 2010, it launched a series of attacks on churches and government buildings in Baghdad to woo foreign fighters and its own deserters back to the fight in Iraq.

The Islamic State also began a campaign of jailbreaks, freeing thousands of prisoners in more than a dozen assaults. Many more were released from U.S detention camps, among them many of the group’s senior leaders in the years to come.

There were many positions for them to fill, especially after 2010, when the U.S. military killed scores of Islamic State leaders, including its emir and its founder. The leadership was further thinned by the new emir, Abu Bakr al-Baghdadi, who purged people he suspected of disloyalty. Baghdadi replaced them with former members of Saddam’s military and security apparatus, many of whom had joined the Islamic State’s previous incarnations in the early days of the Iraqi insurgency but whose rise through the ranks was previously limited by the ideologues. Old hands at running an authoritarian state, these former Baathists helped the Islamic State rationalize and centralize its bureaucracy to impose order on its far-flung operatives—a process already underway before their ascendance. This melding of ideas and praxis from the different strands of membership, from Al Qaeda veterans to intelligence officers, helped prime the organization for its future revival.

Streamlined and replenished, the Islamic State was ready to take advantage of the U.S. drawdown in Iraq and of Syria’s slide toward civil war in 2011. In Iraq, it stepped up its attacks on Iraqi forces to divide their attention, and it assassinated recalcitrant shaykhs to forestall future opposition. It dispatched operatives to Syria to set up a new branch, the Nusra Front, which catalyzed the Syrian civil war with a series of spectacular terrorist attacks. By 2012, the Islamic State was fighting out in the open again and by 2013 it was capturing cities. It was no longer in the wilderness.

Given the weakening of capitals around the modern Arab world, it is little wonder that the Islamic State believes ancient and recent history is on its side.

If the Islamic State’s government collapses, it will go to ground again. Rather than rats fleeing a sinking ship to more hospitable climes, many Islamic State members will scurry to hide in the ruins of their state and wait to emerge when their enemies begin to rebuild on the rubble. They will assassinate collaborators to forestall rapprochement and to eliminate future competitors. They will launch spectacular terror attacks in Syria and Iraq to alleviate pressure on their organization and attract fresh recruits. And they will think deeply about what they did wrong and how to do better the next time—they are convinced there will be a next time since there is little hope of an equitable political solution in Syria and Iraq that mollifies the Sunni Arab population. Even if there were, there is no regional force capable of enforcing it and no international power with the stomach to do so for the long term.

The Islamic State’s understanding of the ebb and flow of revolutionary warfare, and even the terminology it uses to explain its rejuvenating withdrawal, is indebted to Mao. It is not an insurgency based in cities but rather an insurgency that grows strong in the wilderness and then overwhelms cities. When it relinquishes its hold on cities in Iraq and Syria in the coming months, who will pursue the group into its desert hideouts and river valley swamps?

The Islamic State’s concept of rural renewal is not only indebted to Mao. It also has deep roots in Islamic history, the annals of which are filled with coarse insurgents from the countryside who overwhelm settled cities—so much so that one of the world’s first sociologists, Ibn Khaldun, formulated a theory of political change premised on recurring invasions from the periphery. When urban civilization grows soft and lax, he argued, battle-hardened marauders from the mountains and deserts inevitably sweep in and take over. Given the weakening of capitals around the modern Arab world, it is little wonder that the Islamic State believes ancient and recent history is on its side.