As the Islamic State group tries to expand and take root across the Middle East, it is struggling in Syria-- part of its heartland--where it has stalled or even lost ground while fighting multiple enemies on several fronts.
Signs of tension and power struggles are emerging among the ranks of its foreign fighters.
The extremists remain a formidable force, and the group's hold on about a third of Iraq and Syria remains firm. But it appears to be on the defensive in Syria for the first time since it swept through the territory last year and is suffering from months of US-led coalition airstrikes and the myriad factions fighting it on the ground.
"They are struggling with new challenges that did not exist before," said Lina Khatib, director of the Carnegie Middle East Center in Beirut.
Kurdish forces dealt the Islamic State its heaviest setback by driving it from the border town of Kobani in northern Syria last month. Since then, those forces have joined with moderate Syrian rebels to take back about 215 villages in the same area, according to Kurdish commanders and activists, including the Britain-based monitoring group, the Syrian Observatory for Human Rights.
The gains have strained supply lines between the Islamic State group's westernmost strongholds in Aleppo province from its core territory in eastern Syria. The Kurdish-rebel forces are now expected to take the fight to some of those strongholds, particularly the large towns of Minbij and Jarablus, as well as Tal Abyad, a border crossing with Turkey that is a major avenue for commerce for the extremists.
Around the town of al-Bab, one of the IS group's westernmost strongholds, the extremists are making tactical withdrawals. Residents have noted a thinner militant presence in al-Bab.
The militants are also finding themselves bogged down in costly battles with the government forces of Syrian President Bashar Assad.
The extremist group, also known as ISIS or ISIL, has been stuck in fierce fighting with the Syrian army near the Deir el-Zour air base, the last major Syrian military stronghold in the eastern province. IS launched an unsuccessful attack to seize the base last month, and it continues to try.
It is too early to call the shifts a turning point, but they represent the slow grind of the international campaign against the Islamic State group, which long seemed unconquerable as it seized territory stretching from outside the city of Aleppo in northern Syria's at one end to the outskirts of the Iraqi capital of Baghdad at the other.
In Iraq, the combination of coalition airstrikes, Kurdish forces, Shiite militias and Iraqi troops have pushed IS back around the edges, but the militants succeeded this week in taking new territory for the first time in months. They also raised new alarms with the presence of their affiliate in Libya.
But it was in the Syrian town of Kobani that the Islamic State suffered its worst single loss — more than 1,000 militants killed — and much of its heavy weaponry and vehicles destroyed. The January defeat followed five months of fighting by mostly Kurdish ground forces and coalition airstrikes that left about 70 percent of the town in ruins and sent tens of thousands of its residents fleeing over the nearby border into Turkey.
After the loss of Kobani, signs of fissures within the IS group have emerged.
Bari Abdellatif, a resident of al-Bab who also has fled to Turkey, said friction between Chechen and Uzbek militants recently led to clashes between the two that ended only with the intervention of Omar al-Shishani, a prominent Chechen IS commander. At least two senior figures were killed because of the internal strife, he said.
"The prolonged battle for Kobani caused a lot of tensions — fighters accused each other of treachery and eventually turned on each other," Abdellatif said.
Several other activists confirmed recent clashes between factions from different national backgrounds within IS.
Last month, a senior official with the group's Hisba, or vice police, was found beheaded in Deir el-Zour province. A cigarette was stuffed in his mouth, apparently trying to show he was killed for smoking, which is banned by IS, but there are suspicions the official — an Egyptian — was killed by the extremists who suspected him of spying.
An activist based in the group's de facto capital of Raqqa, Syria, said foreign fighters bicker over administrative and financial issues. Several militants have been killed on suspicion of spying or trying to defect.
"Daesh tries to portray itself as one thing, but beneath the surface there's a lot of dirt," the activist said, using the Arabic acronym for the group and speaking on condition of anonymity out of concern for his security.
Earlier this month, the extremists dismissed one of the group's religious officials in Aleppo province and referred him to a religious court after he objected to the immolation of a captured Jordanian air force pilot, the Syrian Observatory for Human Rights said.
"IS is now beginning to struggle to keep its own forces coherent — and this is separate from all the external factors that are impacting it negatively," Khatib said.
She said the new troubles have a lot to do with the fact that IS in Syria is operating in the context of a civil war where people become greedy and refuse to cede power to others.
"Even ISIS is not immune from the warlord phenomenon that takes place in the context of civil war and is being witnessed in Syria today," she said.
In Raqqa, stepped-up coalition airstrikes in response to the Jordanian pilot's killing has shaken the group, activists say.
An anti-IS media collective called Raqqa is Being Slaughtered Silently said the extremists have been forcing residents to donate blood after dozens of fighters were seriously wounded. It also reported that the group recently imposed a nighttime curfew and put up nighttime roadblocks to curb desertions by members trying to reach Turkey.
While foreigners from around the globe have joined IS, many disillusioned new recruits have left or are trying to leave, finding life to be very different and more violent than they had expected.
The Observatory says the militant group has killed more than 120 of its own members in the past six months, most of them foreign fighters hoping to return home.
"When we take all these little puzzle pieces together and we assemble our mosaic, it's very clear that they're having issues. ... I believe that they are hurting," said Scott Stewart, vice president of Tactical Analysis at Stratfor, a global intelligence and advisory firm.
Faysal Itani, a resident fellow at the Atlantic Council, said it has become more difficult for IS to make substantial territorial progress, but the group still does not face any significant challenge to its rule in its strongholds.
"ISIS continues to build support among tribal groups, and attract fighters defecting from other insurgent groups," he said.