While the world’s attention was focused on Brazil and the World Cup, the Middle East has apparently gone to pieces. Fighting and unrest has now spread through a zone of conflict that extends from the northernmost Persian Gulf to the northeastern corner of the Mediterranean Sea. While fighting in Iraq and the Syrian Civil War hasn’t truly fused into one contiguous battle, it is certainly now one great big war; the fights are fully linked and involve many of the same participants, kind of like the European and Pacific Theaters during World War II.

Last week’s fall of Mosul, Iraq’s second largest city, took Western analysts by surprise and has sparked a mad scramble in the political-media complex for talking points about who to blame, who to support, and what position to take. The developing situation is certainly complex, but here’s some basic background about what’s going on and who is fighting whom (in Iraq).

There’s a couple of big things to keep in mind when figuring all this stuff out. First, as much as we like to pick a side to root for, often there really isn’t a good guy in the fight. Traditionally, the enemy of my enemy is my friend. But, in this sort of skirmish, the enemy of my enemy may still be an enemy. Even if you’re fighting alongside them today, it doesn’t mean you weren’t enemies in the past or won’t be again in future.

Second, there are a lot of very different ways for groups to be aligned with or hostile to each other. It’s like figuring out how to group science fiction nerds with an interest in sports who also belong to gangs. Maybe for one fight, it’s Star Trek versus Star Wars (versus Firefly). In another, it's Yankees versus Red Sox. On another occasion, it would be between Crips and Bloods.

Identity and affiliation are complex issues in the region, so what may be a sensible way of explaining things one day can be riddled with caveats the next, and no single explanation should be taken as gospel truth.

A common, but not entirely accurate, way to characterize the Iraq conflict is as a fight between the Sunni and Shia sects of Islam. The Shia-Sunni split is a perennial fallback explanation for conflict in the Middle East among folks in the West. However, in a guns and money sense, the fighting in Iraq and Syria is really part of a long, ongoing proxy war between the two major regional powers: Saudi Arabia and Iran.

Although Iran is Shia and Saudi Arabia is Sunni, the conflict between these two isn’t because they are natural enemies; rather, it is because they are natural rivals, and religion serves as a marker of convenience. Both countries are giant, wealthy oil-rich countries that share geography, so rivalry seems inevitable. Prior to the 1979 Iranian Revolution, the rivalry was kept to a dull roar by the US but since then things have just deteriorated.

But for the sake of familiarity and convenience, let’s just divide folks into Shia and Sunni anyways, because it’s the easiest way to start.

Iran and Saudi Arabia are the two regional powers in the Gulf Region, and their battle for control is driving many conflicts throughout the region.

Team Sunni

The big name on the Sunni side is ISIS. The insurgent group originally started in the mid-2000s during the Iraq War, where the group developed a lot of close relationships and affiliated closely with local al Qaeda franchises. But ISIS really hit its stride in the Syrian Civil War, gaining some notoriety as the folks who were so psycho that they got dumped by al Qaeda. It’s not entirely clear whether psychopathy was actually the reason for the split, or whether it was an administrative and bureaucratic turf fight that got of hand, but you’re likely to hear both claims in the coming days.

Another forgivable misperception about what’s happening in Iraq is that ISIS is this big army that’s charged in from Syria, stomping on everything, and bearing down on Baghdad like a steamroller. In fact, ISIS is a group of maybe 10,000 guys, which is at the front of a whole sea of smaller Sunni militant groups stirring up grief in Iraq. Together, these groups have been causing immense problems for the Baghdad government, which effectively lost control of the western half of the country about six months ago.

While 10,000 troops is enough for a sizable military formation, it’s deeply unlikely that they are coordinated to fight as a large, single unit, like a division or brigade. At this point, the ISIS forces are certainly much more like a militia than random terrorists, and are effectively a highly mobile force of infantry, mounted on light unarmored vehicles, probably operating in groups of a hundred to a few hundred, and relying on strong support from local Sunnis.

A final note about ISIS: Many of its fighters are actually Iraqi. While about a third are foreign, including a large Chechen contingent of about 1,000 and maybe 500 from the West, effectively much of ISIS isn’t wildly different in composition from some of the independent Sunni militias operating in western Iraq.

Team Iraq

There really hasn’t ever been much of a Team Iraq in all this from the get go. That said, there’s been better times and worse times. And right now, the fortunes of Team Iraq are pretty abysmal.

Although Saddam Hussein was a Sunni, and Iraq fought Shia-dominated Iran as the Saudi proxy in the Iran-Iraq War, Saddam was on a different mission, pushing the Baathist ideology. Baathism advocates some elements of socialism (a sort of Arab version) as well as nationalism, or at least pan-Arab nationalism. Whether or not the national socialist flavor of Baathism means it has any connection to rather more infamous varieties of National Socialism, the two modern Baathist states, Iraq and Syria, have certainly ruled with a totalitarian approach to internal political opposition.

The upshot of the Baathist rule of Iraq is that while Saddam’s regime beat down the Shia as well as various ethnic minorities with great zest, and favored the Sunni at the expense of others, this was as much as a Baathist quest for political power as anything else. This meant Saddam didn’t attract quite the same level or kind of sectarian bitterness that might have otherwise arisen in primarily ethnically or sectarian-driven oppression.

During the Iraq War, and towards the back end of direct US combat in that conflict, the general understanding in the US was that a stable, unified Iraq was the most desirable outcome for the region. This would require a lot of careful work among the various ethnic groups, putting in place power-sharing agreements, and working to keep government institutions — especially the military — truly national and representing all Iraqis.

And, for a brief while, it seemed like all of this might come to pass. With some pressure from the US, the Iraqi Army (also known as the Iraq Security Force or ISF) promoted professional, patriotic Iraqis and bypassed the excessively sectarian ones who weren’t in the army to serve the country as a whole.

But in the end, as the US completed its retreat, Nouri al-Maliki came to power. He brought with him a basket of bad governance pushing Team Shia, leaving Team Iraq, which was never that strong to begin with, a shadow of its former self.

Team Shia

Maliki has been beating on the Sunni and the Kurds in much the same way that Saddam was beating on the Shia and the Kurds, except for two things. One, Maliki hasn’t been putting a non-sectarian, nationalist political frosting over the top of it. Two, Saddam was only broadly known and understood to be a proxy for the Saudis and Gulf Arab States; Maliki and has been a lot more open about getting in bed with his benefactors, the Iranians, relying on them for things like delivering key voting blocks to maintain his grip on power.

In his zeal to find hidden Baathists seeking to unseat him, Maliki has been authoritarian, using the military as a hammer to pound on various Sunnis, Kurds, and whoever else. Maliki became distrustful of the ISF, seeing as it’s full of Sunnis, Kurds, and other generally non-Shia folks.

As a result of this mistrust, the Iraqi Army reverted to its old ways — rich in corruption and sectarian favoritism, and poor in professionalism and patriotic nationalism (in the sense of people fighting in the service of Iraq, rather than on behalf of their particular subgroup). Over a couple of years, this decline, coupled with purges of non-Shia officers, has greatly reduced the effectiveness of the Iraqi military, turning it into Maliki’s Great Big Personal Shia Militia.

Still, it wasn’t widely understood how quickly and severely this had undermined the Iraqi army until the battle of Mosul last week, when some 800 ISIS soldiers caused two Iraqi divisions (totaling about 30,000 troops) to break and run, ditching uniforms and equipment.

Since then, Iran has announced that they’re deploying troops from the Revolutionary Guards to Iraq. Specifically, two battalions of Quds Force troops will join Iranian troops already in Iraq. The US troops most comparable to the Quds Force are the US Army’s Green Berets — special forces units whose primary role is training local forces to improve their effectiveness and lethality. Iranian troops have been involved in fighting in Iraq, directly and indirectly, for a number of years. However, it is rather rare for the Iran's government to openly announce deployment of special forces units.

The exact specifics of the Quds Force deployment is a bit unclear. But it is more than likely that they will be working with Shia militias, particularly ones that have seen a massive uptick in volunteers following the fall of Mosul, who will be working hard to integrate new, untrained personnel.

Beyond the recent movement of troops, Maliki has been informed by the highest levels of the Iranian government that it is willing to offer Iraq whatever assistance it needs, which likely includes spies, intelligence networks, larger formations of the Revolutionary Guard, and potentially even air support. It’s not clear how much of this help Maliki will need or take, since this kind of offer often comes with strings attached.

Team Kurd

One potential winner in all of this might be the Kurds, an ethnic minority in northern Iraq, northwestern Iran, northeastern Syria, and easternmost Turkey. Without their own state, they’ve been under the heel of the central government in just about every country they’re found in. However, one of the consequences of turmoil in Iraq in recent decades has been the establishment of a fairly autonomous Kurdish regional government in northern Iraq. Then, during the ongoing Syrian conflict, Syrian Kurds have also taken the opportunity to carve out their own chunk of territory, effectively managing a Syrian Kurdistan which has been able to protect its borders and largely avoid being drawn into the main fighting.

The Iraqi Kurds have formed their own military units, the Peshmerga, who fought alongside the US during the Iraq War and performed quite well. In the recent Iraqi efforts to regain control of their lost cities, it has become apparent that the central government will have difficulty in retaking territory in northern Iraq without help from the Kurds.

Traditionally, all the governments of the region have been united in their opposition to independence for any Kurdish group, fearing that independence for one would inflame separatist movements in their own country. However, as Iraqi Kurdistan has been slowly taking shape and come to rely on Turkish help to develop and transport its oil for the world market, Turkey's central government has become cautiously supportive of an independent Kurdistan in Iraq.

The Iraqi central government is clearly incapable of establishing control over its own territory. Further, advances by ISIS have effectively cut Iraqi Kurdistan off from Baghdad, while the Kurds haven’t been particularly active in fighting ISIS and helping Baghdad retake Mosul. Previously, when Iraq was a primarily US project, the Kurds fought alongside the US essentially on behalf of an Iraqi national unity government, and the US government worked to keep Kurdistan in Iraq.

However, as Iraq becomes more closely tied to Iran and further removed from the US (in part because of Maliki’s sectarian power grab), it is less likely that the US will exert much influence to prevent Iraqi Kurds from breaking away. A spokesman for Turkey’s ruling party said in a recent interview that “The Kurds of Iraq can decide for themselves the name and type of the entity they are living in,” lending weight to the idea that Turkey wouldn’t object to an independent Kurdistan. Add all of this together, and it’s not a huge surprise that Iraq’s Kurds seem more and more interested in going while the going’s good.

What’s next?

The situation in Iraq is incredibly fluid right now, so it’s hard to predict what will happen. Yet despite the complexity and chaos, there is a bit of room for a few reasonable guesses.

It’s unlikely that ISIS will take Baghdad quickly, or at least take Baghdad without a major fight. Baghdad is now a predominately Shia city, and this means the Shia militias will be fighting on their home turf, leveraging their local knowledge and support from the population.

It will also probably be some time before the uprising in Sunni Iraq can be quelled or ISIS driven completely out of Iraq.

But, beyond these generalities, the fight in Iraq is very much in the “stay tuned” phase: long on drama and change, but short on concrete information and certainty.

Follow Ryan Faith on Twitter: @Operation_Ryan