The defeat of the Islamic State in its self-declared capital of Mosul does not mean U.S. troops will be coming home anytime soon, and instead, the top U.S. commander in Iraq said some U.S. troops will likely remain there indefinitely in order to avoid the mistakes of the Obama administration by declaring victory too soon.

"I think all of us can look back to the end of 2011 when the U.S. and coalition forces left Iraq the last time and saw what played out in the intervening three years," Lt. Gen. Stephen Townsend told Pentagon reporters in a video briefing from Baghdad. "I don't think we want to replay that."

Townsend said in short term, there would be no drawdown of U.S. forces because while ISIS has been vanquished in Mosul, it still holds other areas of Iraq.

"This fight is far from over," Townsend said. "So I wouldn't expect to see any significant change in our troop levels in the immediate future because there's still hard work to be done by the Iraqis and the coalition."

ISIS still controls large portions of Ninawa province, where Mosul is located, including the population center of Tal Afar, as well as Hawija in Kirkuk province north of Baghdad, and large areas of western Anbar province.

But even after ISIS is completely eliminated, the Iraqi government has indicated it would like some need for U.S. troops to remain.

"I would anticipate that there will be a coalition presence here after the defeat of ISIS," Townsend said. "I'm reasonably sure it will be smaller and roles will be a bit different, more in the train-and-equip line of effort that we're doing now, but I think we'll be doing that after the defeat of ISIS."

There are currently about 5,000 U.S. troops in Iraq. Townsend declined to say what troop levels he would be recommending to President Trump.

"I'll reserve my advice to my chain of command. There is a proposal that our government's looking at," he said. "So I think our leaders need to now decide that."

But Townsend also said the key to keeping ISIS or any other extremist groups from rising again in Iraq is not foreign troops, but domestic political reconciliation.

"I think the primary condition that caused the rise of ISIS was the fact that a significant portion of the Iraqi population, in this case, the Sunnis, felt disaffected. They felt like Baghdad was not their government; didn't represent their interests," Townsend said. "The Iraqis have to make sure after ISIS is defeated, that all Iraqis view the government in Baghdad as their government."