The Islamist storm passing through Iraq right now has been building up since the United States invaded the country in 2003, which unleashed longstanding sectarian rivalries that spilled over into civil war. But the appalling brutality currently on display, initiated by the Islamic State in Iraq and al-Sham, or ISIS, is more than a carnival of revenge.

At the time of the American invasion, Al Qaeda was essentially defeated, scattered, and discredited all over the Muslim world. Iraq had nothing to do with Al Qaeda then. After all, Shiites comprise about sixty per cent of the population, and some figures have Sunnis making up less than twenty per cent. Al Qaeda under Osama bin Laden and his lieutenant—and successor—Ayman al-Zawahiri did not see Iraq as a likely candidate to become a Sunni Islamist state.

Al Qaeda didn’t reckon with Abu Musab al-Zarqawi. Bin Laden and Zarqawi had been rivals since the days of the anti-Soviet jihad in Afghanistan, in the nineteen-eighties. Bin Laden, a Saudi, along with Zawahiri, an Egyptian, populated Al Qaeda training camps with young fighters largely drawn from their own countries. In 2000, Zarqawi, a Jordanian who had been a convicted thief and sex criminal before turning to radical Islam, created his own group, drawing from his country and the region known in Arabic as al-Sham, or the Levant—that is, Palestine, Lebanon, and Syria. He called his force at that time the Army of the Sham.

The rival organizations had different objectives. Al Qaeda was originally envisioned as a kind of Sunni foreign legion, which would defend Muslim lands from Western occupation. What bin Laden invoked as an inciting incident for his war on the West was the First Iraq War, in 1990, when half a million American and coalition troops were garrisoned in Saudi Arabia in their successful campaign to repel the forces of Saddam Hussein, who had invaded Kuwait.

Bin Laden had asked Zarqawi to merge his forces with Al Qaeda, in 2000, but Zarqawi had a different goal in mind. He hoped to provoke an Islamic civil war, and, for his purposes, there was no better venue than the fractured state of Iraq, which sits astride the Sunni-Shiite fault line.

The crippled condition of Al Qaeda’s core after 9/11 left the field free for Zarqawi to wage his own brand of jihad. Guided by certain Islamist thinkers who believed that attacking Shiites would draw Sunnis to their cause, Zarqawi concentrated his violence on native Iraqi Shiites, not the American military. He began his campaign in August, 2003, just five months after the American invasion, with a car-bomb attack on the Imam Ali Mosque, in Najaf. As many as a hundred and twenty-five Shiite Muslims were killed at Friday prayers, including Ayatollah Muhammad Bakr al-Hakim, who might have provided moderate leadership to the country. Zarqawi also targeted Iraq’s professionals—the lawyers, teachers, doctors, and academics who together formed a fragile social matrix.

In 2004, Zarqawi pledged allegiance to Al Qaeda. Zarqawi then called his organization Al Qaeda in Iraq (A.Q.I.). For bin Laden, Zarqawi’s network offered the opportunity to extend the Al Qaeda brand in a field where American boots were on the ground. For Zarqawi, it drew new recruits to the fray, who longed to fight under the Al Qaeda black banner.

From the start, however, bin Laden’s lieutenant Zawahiri despaired of Zarqawi’s bloodthirstiness and his fixation on the Shiites. “Can the mujahideen kill all the Shia in Iraq?” he asked in a July, 2005, letter to Zarqawi. “Has any Islamic state in history ever tried that?” Zawahiri also counselled against cutting off the heads of captives; a bullet would suffice, without the damaging publicity.

Bin Laden and Zawahiri were certainly familiar with the use of violence against civilians, but what they failed to grasp was that, for Zarqawi and his network, savagery—particularly when directed at other Muslims—was the whole point. The ideal of this movement, as its theorists saw it, was the establishment of a caliphate that would lead to the purification of the Muslim world. The Islamist strategist Abu Bakr Naji offered a revealing outline of Zarqawi’s method in his 2004 book, “The Management of Savagery.”

Naji proposed a campaign of constant harassment of Muslim states that exhausted the states’ will to resist. He suggested concentrating on tourist sites and economic centers. Violent attacks would create a network of “regions of savagery,” which would multiply as the forces of the state wither away, and cause people to submit to the will of the invading Islamist force. Naji believed that a broad civil war within Islam would lead to a fundamentalist Sunni caliphate.

Zarqawi was killed by an American bomb, in 2006. American forces, along with a movement of Sunni tribes who rejected Al Qaeda, called the Awakening, bottled up his movement in Iraq; but the revolution in Syria created a new opportunity.

The movement is led now by an elusive figure named Abu Bakr al-Baghdadi. Reflecting its expanding turf, A.Q.I. changed its name to the Islamic State in Iraq and al-Sham. Zawahiri urged ISIS to stay out of Syria, leaving it to the designated Al Qaeda affiliate, Jabhat al-Nusra. Characteristically, ISIS engaged in shocking brutality, even against rival Islamist groups. In 2013, it took over the provincial capital of Raqqah, in northern Syria, on the banks of the Euphrates—the first real victory in the rebellion—and once again drew many foreign jihadists to its cause. Zawahiri couldn’t tolerate the insubordination of Baghdadi’s troops, and in February of this year Zawahiri booted ISIS out of the Al Qaeda consortium. By that time, ISIS had returned to Iraq and taken over Fallujah, the first major city in the country to fall under its rule.

According to one estimate, in the Long War Journal, ISIS now controls a third of Iraq. The strike has been so sudden and surprising that other forces haven’t yet responded, but they will. And then the long-sought goal of Zarqawi and his progeny—a vast war inside Islam—will become a reality.

Photograph: AP.