Emirates of varying sizes have popped up in many places, from northern Nigeria to the southern Philippines. What allowed Islamic State to grow beyond any of these was a set of special conditions. Al-Baghdadi was able to claim large swathes of territory because local forces were either unwilling to fight, as in northern Iraq, or occupied with other pressing problems, such as the civil war in Syria. In both countries, he was able to capitalize on ethnic and sectarian enmities, whether between Shiites and Sunnis or between Arabs and Kurds.

The proximity to major tourist destinations, such as Jordan, Lebanon and Turkey, allowed a path for foreign fighters to flock to the caliphate, especially in the early phase, when these countries weren’t paying adequate attention to their borders with Iraq and Syria. It also provided a market for the smuggling that was critical to the Islamic State economy.

Finally, al-Baghdadi benefited from the negligence of the U.S. and other Western nations. Islamic State rose even as Barack Obama’s administration was pulling troops out of Iraq, and expanded while the U.S. and Europe dithered about getting involved in the Syrian civil war. Terrorist groups with territorial ambitions tend to retreat quickly “when the U.S. shows up and hits them hard,” says Daniel Byman of the Brookings Institution’s Center for Middle East Policy. “In Syria, the U.S. didn’t show up for the first few years.”