It was early July in 2006, and the United States-led war in Iraq had been heading south for two years. Shiite militias and armed groups like the Jaish al-Mahdi (or the Mahdi Army) were systemically going about taking what they believed, in a country that was 60 percent Shia, was rightfully theirs: vengeance.

The Shia had been an oppressed minority under the tyrannical rule of the late Saddam Hussein. Under Saddam, those in the Sunni sect of Islam, though just 20 percent of the population, got all the spoils. But now the Shia were targeting Sunni families for execution throughout neighborhoods in central Iraq, including Baghdad.

Major General Pete Chiarelli, then the second highest ranking U.S. military officer in Iraq, and his British counterpart sought an urgent meeting with Prime Minister Nouri al-Maliki, himself a Shiite who just a year earlier had been a midlevel official in the Dawa party—one of the country’s two main Shiite political parties. He had been prime minister for just over two months when one of Chiarelli’s deputies unfurled a map with the locations of bodies found the previous evening in Baghdad. The intent was to show how out of control the sectarian violence was becoming, and that the central government’s most urgent task was to get control of it.

Al-Maliki was unmoved. “It was much worse,” he replied diffidently, “under Saddam.”

It has taken eight years for the sectarian tension sown by the government Washington entrusted with Iraq’s future to devolve into a full-fledged catastrophe, as it now has. In a matter of days, a radical Sunni insurgent group, the Islamic State of Iraq and Syria (ISIS), has stunned the government, taking towns large and small in northern Iraq—from Fallujah, site of one of the bloodiest battles in the American-led war in Iraq, to Mosul, the country’s second largest city, to Tal Afar, near the Syrian border—before proceeding toward Baghdad.

Many Iraqi troops, trained by the U.S. military during the occupation, shed their uniforms and joined hordes of refugees headed south, trying to stay ahead of the Al-Qaeda offshoot now reaping terror in the country they ostensibly were trained to defend. On June 16, ISIS posted pictures on social media sites showing its members shooting scores of men lined up and blindfolded. (The authenticity of the pictures could not be immediately verified.)

As of Monday evening, ISIS—joined by at least some new Sunni fighters picked up along the way south—had made it to Baghdad, with some of its fighters infiltrating the so-called Green Zone, seat of the Iraqi government.

The fear of an outright collapse of the al-Maliki government to an Al-Qaeda offshoot reverberated near and far. In Iraq, the Grand Ayatollah Ali al-Sistani, the most powerful Shiite cleric in the country, called for his fellow Shia to take up arms to resist the coming ISIS onslaught.

During the American occupation that began in 2003, Sistani had been a force for moderation, using his religious authority on several occasions to rein in Shiite militias when the country crept closer to outright sectarian civil war. His call to arms spoke to the magnitude of the unfolding debacle.

So, too, did Washington’s reaction. President Barack Obama, who by withdrawing the last U.S. troops out of Iraq in 2011 had hoped to wash his hands of what he regarded as a “stupid” war, sent a U.S. carrier group to the Persian Gulf as drones flew over Iraq gathering intelligence for possible airstrikes. Far more consequential than that, the administration hinted that it might cooperate with Iran to try to halt the ISIS assault and salvage the al-Maliki regime.

Iran, meanwhile, sent members of its elite Quds Force to aid the fight against the Sunni radical group, and its Iranian Revolutionary Guard Corps (of which Quds is the overseas arm) has trained thousands of Shiite militiamen in the years since Saddam was toppled.

Some press reports suggested that Washington and Tehran might use the latest round of nuclear talks between the countries—which began on June 16 in Vienna—to begin talking on the side about how to salvage Iraq. A former U.S. intelligence analyst who has worked on Iraq for years said the news of possible cooperation with Tehran “simply confirms what’s been pretty clear for a long time now: We went to war in Iraq in 2003—and Iran won.”

Common ground between Washington and Tehran will likely be difficult to find. The Iranians want the Shiites to continue to dominate the Iraqi government, with al-Maliki continuing to bow to Tehran. Meanwhile, Obama said publicly that he wanted al-Maliki to take concrete steps to reduce sectarian tensions, including formation of a new government that will represent the Sunnis, Shia and the Kurds, who make up the third largest population segment in Iraq. The White House said it had asked the Kurds to work with al-Maliki to persuade the Sunnis that the next government “will be an ally and not an adversary.”

For now, on the ground in Iraq, that notion seems close to fanciful. At the main checkpoint in Kirkuk, one of the major production centers for Iraqi oil—and where late in the afternoon of June 16 three loud explosions could be heard—Seif Zaad stood next to his black SUV, which was covered in sand from the long drive he and his family had just made from Fallujah.

He had finally made it through the passport control and security check, administered by the peshmerga, the main Kurdish militia, but his wife, children and brothers were still waiting in the maze of cars on the other side of the checkpoint. Like thousands of other Iraqis, he had fled to Kirkuk Monday after ISIS forces attacked government troops in cities close to the capital, including Fallujah and Tikrit.

Other people have taken up arms, too. As the violence intensified around Baghdad Monday, Sunni families living in Fallujah began arming themselves and fighting the Iraqi military, Zaad said. (Just how many men ISIS has under arms and how much weaponry they can bring to bear remains unclear.) The goal of the group’s Sunni supporters is straightforward: “We would work with the devil,” Zaad said, “but not with Maliki. If Maliki goes, everything would be perfect.”

Scores of Sunnis interviewed byNewsweek in Kirkuk echoed that sentiment, embittered by years of what they describe as political and economic disenfranchisement, as well as outright violence against the Sunni minority. All the gains won by the so-called Anbar Awakening starting in 2006—when Sunni tribes began to work with the surge in U.S. troops to drive Al-Qaeda out of Iraq—are now gone.

Many Sunnis believe al-Maliki revealed his true colors politically just after the last U.S. troops departed, when he set out to arrest Sunni Muslim Vice President Tareq al-Hashemi, who fled the country in response. Abu Moloud Abas, like Zaad a man fleeing from Fallujah with his family, said he did not think andrewtheprophet.comki,” Abas said. “Even if Saddam Hussein made women cover up with head scarves and were strict, even if he killed 100 people a day, it would be better than Maliki.”

That ISIS will be able to reach its stated goal—of establishing a radical Islamic caliphate encompassing Syria, where it originated and continues to fight against the government of Bashir Assad—is unlikely. Not with the Shiite militias, whose dirty work al-Maliki so blithely dismissed eight years ago, joining the fight. And most certainly not, many intelligence analysts believe, with Iran’s Quds Force set to aid them.

The gloomiest forecast of the skeptics about the U.S. war in Iraq was always that it would cut loose sectarian forces held in abeyance for decades under Saddam, setting the country on a path to outright, all-consuming civil war. In the eight years American forces fought in Iraq, that was avoided—barely.