These are 2 excellent, detailed, NY Times articles, published today, on thousands of internal documents that help explain how the Islamic State stayed in power so long using extreme brutality by their fighters and detailed record-keeping by their bureaucrats. They conquered significant territory in Syria and Iraq, established governmental structures, collected taxes, ran their own courts, fed their people and captured the attention and fear of the world. They achieved success that Osama bin Laden only dreamed about.

And I fear we are about to make the same mistake we have twice made in that part of the world in the last 30 years, pull out. STRATFOR, in an article I forwarded to you today laid out some of the advantages and disadvantages they see in our pulling out. I can only see disadvantages, not the mention the abandonment of the Kurds to the mercies of Turkey. Those same Kurds, who have been our most able and loyal allies in destroying ISIS strongholds, will not be able to resist Turkish military might. And once again it seems we are unable to understand that loyalty is a two way street and our reputation in the world will be again diminished.

https://www.nytimes.com/interactive/2018/04/04/world/middleeast/isis-documents-photos.html
https://www.nytimes.com/interactive/2018/04/04/world/middleeast/isis-documents-mosul-iraq.html
The ISIS Files