“What we see in Iraq today is in many ways a culmination of what the I.S.I. has been trying to accomplish since its founding in 2006,” said Brian Fishman, a counterterrorism researcher at the New America Foundation, referring to the Islamic State in Iraq, the predecessor of ISIS…

The group’s recent annual report, wrote Alex Bilger, an analyst at the Institute for the Study of War, makes clear that, “the ISIS military command in Iraq has exercised command and control over a national theater since at least early 2012,” and that the group is “functioning as a military rather than as a terrorist network.”…

Though the group got its start battling the Americans in Iraq, its success after the occupation ended was largely missed — or played down — by American officials. In the middle of 2012, as the group strengthened and United Nations data showed civilian casualties in Iraq on the rise, Antony J. Blinken, the national security adviser to Vice President Joseph R. Biden Jr., wrote that violence in Iraq was “at historic lows.”

That is partly because its prospects initially appeared limited at the end of the American occupation. During the sectarian war that began in 2006, Sunni jihadists antagonized the public with their brutality and attempts to impose Islamic law, and suffered defeats at the hands of tribal fighters who joined the American counterinsurgency campaign, forcing them to retreat from western Iraq to areas around Mosul.