Its recruitment rocketed as it gained ground in the Syrian civil war from 2013 on,and then captured large parts of northern and western Iraq in in June 2014.
But it lost most of its border territory to Kurdish-led Syrian forces backed by US-led airstrikes who forced it from parts of north-eastern Syria after defeating it in the battle for the border town of Kobane in 2015.
The US saw that campaign,spearheaded by the Kurdish People's Protection Units (known as the YPG),as key to isolating the extremist group's de facto Syrian capital of Raqqa and disrupting its supply lines.