There have been many factors to the rise of ISIS, from a relatively obscure Al Qaeda affiliate that had been forced almost completely underground by a combination of US military power and the Sahwa militias in Al Anbar Province (ISIS was originally Abu Musab al Zarqawi’s Al Qaeda in Iraq), to a cross-border rebel/terrorist group in Iraq and Syria that appeared to spend more time fighting with the other Islamist militias than they ever did fighting the regime, to the new terror of the Middle East and policy wonks everywhere.

Some of these factors, as have been examined with varying levels of knowledge in multiple places, have to do with what they are doing and how they have learned a much higher degree of operational and strategic sophistication than their predecessor organization.

However, there is more to any conflict than just what one side is doing. As the old saw goes, “The enemy gets a vote.” In this case, who ISIS is fighting has had a great deal to do with their success on the ground.

In Iraq, ISIS’ primary adversaries have been the Iraqi Army and the Kurdish Peshmerga. The IA almost immediately dissolved in the face of ISIS’ advance in June. The Peshmerga, while generally considered better fighters than their southern Arab neighbors, are a mountain militia, not an army. They have little in the way of heavy weapons, no armor to speak of, and their go-to strategy (that has kept them from being wiped out more than once) is, when it starts to look really bad, head for the hills.

As much as the Kurds have steadfastly refused to cower in the face of Islamists or anyone else, they were ill-equipped to deal with ISIS, and were being pushed back, no matter how hard they thumped their chests (and yes, the Kurds do a lot of that). It was air support, and munitions being finally delivered that Maliki had sat on and refused to pass on to the Kurds, that turned the tide and enabled the Peshmerga to break out and push ISIS back south, eventually re-taking Mosul Dam and more territory to the south.

The Iraqi Army situation is more complicated than the Peshmerga situation. Instilling military professionalism in the Iraqi Army has been a near-impossible task for the last 11 years. While there are always exceptions, the officers or soldiers who genuinely care about their country and about being good soldiers, the majority have been about as militarily competent as the terrorists. There are several reasons for this, some political, some cultural.

Politically, the Shi’a-dominated Maliki government had become so corrupt, and so sectarian, that the Sunnis serving in the Iraqi Army didn’t see that they owed the Baghdad government anything anymore. ISIS might be bastards, but they were at least Sunni bastards. So, why should Sunni soldiers die fighting other Sunnis for a Shi’a government that had put them down for years? Similarly, the Shi’a soldiers didn’t see the point in fighting and dying for Sunni towns. As the recent interview with an Iraqi Army officer states, while the Iraqi Army under Saddam was held together by fear of Saddam, it is presently fractured by competing political, sectarian, and tribal loyalties.

Culturally, this is a problem that most all Arab armies have faced, and few, if any, have overcome. In the country briefings before deploying to Iraq, it was outlined how the local loyalties go family, faith, clan, tribe, and then, somewhere along the line, country. This applies to their soldiers just as much as the everyday civilians living out in the cities and villages. Without loyalty to much of anything beyond sect and tribe, no fighting unit is going to hold together.

It’s been said that Arabs are “amoral familialists,” by and large. This means that they don’t form solid bonds with anyone who is not a blood relation (again, as with all cultural and political generalizations in this article, there are exceptions). Since most units are not made up of the same tribe, there goes unit cohesion. If things are going well, it still manages to muddle through. As soon as things start to go south, however, such as your leadership bugging out ahead of anywhere between 400 and 1500 ISIS fighters in pickup trucks, it becomes, “Screw this, I’m not dying for these assholes, I’m out of here!”

AQI was fighting a guerrilla war against an enemy that had it outclassed in materiel and close combat ability. Their goal was to cause enough chaos to make the US decide that Iraq was a bad deal and leave, as well as terrorizing the populace to keep the country from actually forming a stable government (see the 13 candidates assassinated in the lead up to the April 2013 elections). ISIS, having perceived that the goals of getting the US to leave and creating enough of a corrupt, unpopular government (though not entirely through their action) have been met, is now taking the next step, seizing territory, taking advantage of the dissatisfaction with the current government.

The fact that they are now facing foes about on the same level militarily, but without the kind of loyalty to a cause that is their own driving force, has contributed significantly to their success.