The capital of the self-proclaimed Islamic State in Iraq is now under assault. But ISIS isn’t going anywhere. Instead, the terror group is beginning to rebrand itself from a “caliphate” to an insurgency, a top U.S. general fighting ISIS said Wednesday.

It’s much more than a change of name, or even a shift in tactics. It could well mean that there will be no “lasting defeat” of ISIS, even if it loses control of Iraq’s second-largest city, despite Secretary of Defense Ash Carter’s claim of such a victory just four days ago, when the Iraqi campaign for Mosul began. After two years of either training local forces to fight ISIS or hitting the terror group with airstrikes, U.S. officials said they believe it still could evolve into the kind of threat that has plagued Iraq since shortly after the 2003 U.S. invasion.

Fighting that insurgency cost as much as $2 trillion, according to one estimate, and the lives of nearly 5,000 American troops. At its peak, 170,000-plus forces were required to weaken that uprising. It would be the most bitter of ironies if, years later, Iraq once again devolved into a guerrilla war.

An ISIS insurgency could use its foreign fighters to threaten not only Iraq but the West as well. And it likely would fall to nascent Iraqi fighters, who just two years ago ditched their weapons and uniforms in Mosul, to repel ISIS and launch a counterinsurgency.

During a briefing with reporters, Army Maj. Gen. Gary Volesky, the commander of U.S.-led coalition ground forces in Iraq, said troops are seeing three- to five-man mortar teams launching intermittent small-arms fire in cities once controlled by ISIS, such as Fallujah and Ramadi.

“It’s not this organized insurgency that people think of,” Volesky said. But “we are seeing these indications… That’s what we are preparing the Iraqis for.”

Volesky warned that such attacks in liberated areas are one reason the U.S. is advising the Iraqi and Kurdish forces charged with liberating Mosul to move deliberately. Fast-moving forces can open themselves up to strikes from behind.

But can a jihadi movement that no longer has a “caliphate” successfully evolve into a potent insurgency? Or is this the U.S. firing a warning shot across the bow to Iraqi Prime Minister Haider al-Abadi and his Shiite-dominated government not to ignore Iraq’s Sunni minorities? After all, such mistreatment helped fuel the rise of ISIS.

Either way, Volesky’s statement was the latest sign of a U.S.-led coalition’s confidence of the Islamic State’s demise—and its fear that, despite the loss of land, ISIS could still terrorize Iraq.

The warning came during what appears to be a steady push by Iraqi and Kurdish forces toward Mosul’s city center. On Wednesday, they continued advancing toward Mosul, amid reports of residents in villages leading up to the city celebrating ISIS’s defeat. Iraqi and Kurdish forces are now as far as 20 miles outside Mosul’s city center. The U.S. military has said the operation could last anywhere from weeks to months.

But that timetable could shift. In the last week, ISIS has lost a number of key cities in a matter of days. And in those battles, the group appears to be on the defensive before abandoning territory altogether. Most notably, ISIS lost the Syrian city of Dabiq on Saturday to Syrian opposition forces, backed by Turkey, after not much of a fight.

ISIS once declared it would fight to the death for that northern city. According to the group, citing an ancient prophecy, Dabiq would one day become the site of an apocalyptic battle between Christians and Muslims. After its defeat, ISIS said the promised apocalyptic battle would come at a later, unspecified date.

And residents in Raqqa, the terror group’s capital in Syria, have reportedly said ISIS families are pouring in from places like Dabiq and Mosul.

Moreover, there are certainly signs of regular insurgency attacks returning to Iraq. There are nearly daily bombings, usually targeting Shiite-dominated communities and Iraqi security forces. A series of attacks last week killed at least 55 people in Baghdad. And in July, at least 324 people died when a truck bomb struck a popular shopping area in central Baghdad, the deadliest attack since the fall of Saddam Hussein’s regime in 2003. ISIS claimed responsibility for both attacks.

But after two years of brutal reign, ISIS may not be able to attract Sunnis to its insurgency. Not after the terror group that robbed their cities, beheaded their citizens, and made crimes of smoking, shaving, and playing music.

“ISIS is taking its resources and channeling it toward irregular warfare. But one of the problems ISIS has is that everyone understands what life under ISIS is like,” said Daveed Gartenstein-Ross, a senior fellow at the Washington, D.C.-based Foundation for Defense of Democracies. “ISIS has uniquely overplayed its hand.”

But there are alternatives. Al Qaeda, for example, has embraced local Sunnis, not terrorized them, allowing the group to return to areas and recruit members.

That said, ISIS would likely have more resources than most to support an insurgency. And like al Qaeda, it could rebrand itself.

And even as it has suffered major territorial losses in recent months, it still retains control of Raqqa, allowing the group a setting to regroup and potentially rebuild the caliphate. U.S. and Kurdish officials are reportedly discussing a potential plan to liberate the city, but it is unclear what incentive the Kurds have to fight a violent battle for the Arab-dominated city.

“As long as they still hold Raqqa, ISIS doesn’t need to abandon the caliphate,” one U.S. official explained to The Daily Beast.

And it is possible that ISIS, in taking credit for bombings, is exploiting the frustration of other groups seeking to upend the current Iraqi government.

“It’s entirely possible that you will see an insurgency in some of these areas that we think of an ISIS insurgency that is actually a Sunni insurgency,” Gartenstein-Ross explained.

Or just as likely, the U.S. military is wrong. After all, last year, U.S. commanders forecasted an ISIS expansion in Libya, which instead flailed.