The U.S.-led coalition fighting the Islamic State should prepare to maintain a presence in the region to train and support ground forces even after the imminent collapse of the militant group's so-called caliphate, the top coalition commander said.

“I think we need to structure ourselves to be prepared for a long-term commitment to building partner capacity in this area,” Army Lt. Gen. Paul Funk told USA TODAY.

Any decision about a long-term commitment of U.S. troops in Iraq would come from the White House, which has not yet publicly discussed its future plans. "I think that is exactly the way we’re leaning but that will be a decision for the policymakers," Funk said Thursday.

Commanders want to avoid a repeat of 2011 when the withdrawal of U.S. troops from Iraq led to the Islamic State's invasion of Iraq three years later.

A long-term coalition presence will help Iraqi troops prevent a resurgence of the Islamic State, help professionalize Iraq's military and provide a balance against Iranian influence, said James Jeffrey, an analyst at the Washington Institute for Near East Policy and a former U.S. ambassador to Iraq.

The Islamic State, once a formidable force that governed large swaths of Iraq and Syria, has been reduced to several thousand fighters in a string of isolated towns and villages along the Euphrates River. The militant group, also known as ISIS, controls about 5% of the territory it did at its peak.

Commanders expect ISIS to transform from a terror group controlling territory to a more disbursed organization of localized cells. The organization will still be capable of acts of terror, but will pose less of a regional threat than when it controlled territory and mobilized organized military forces.

Fighting that type of terrorist group requires a different set of skills. Much of the coalition training to date has been designed to build a force capable of fighting a conventional battle in cities like Mosul, Iraq’s second-largest city, and Raqqa, the group’s de facto capital in Syria.

“We’ve got to be able to retool and get after those kinds of operations as well,” Funk said in a telephone interview from Baghdad. “We need to do that to build partner capacity to be a bulwark against this terrorist organization.”

Fighting a more conventional terrorist group organized in small, semi-independent cells requires a focus on intelligence and policing. It would not require the extensive air support the U.S.-led coalition has provided to Iraq’s army and the Syrian Democratic Forces, a coalition of Arabs and Kurds fighting ISIS.

"The vast portion of the military piece will morph to a training mission, but it is still required," Funk said.

Any long-term presence in the region will likely focus on Iraq, where the United States has an established government it is working with. In Syria, the U.S. is backing an alliance of militias and the country is in the midst of a civil war.

The U.S.-led coalition has trained more than 100,000 Iraqi troops during the past several years.

Three years after U.S. troops left Iraq in 2011, the country’s armed forces collapsed as the Islamic State swept across the border from neighboring Syria, capturing Mosul and threatening Baghdad.

The Obama administration said it had no choice but to withdraw because Iraq’s Shiite-dominated government would not agree to provide legal protections for a long-term U.S. military presence.

Analysts say the United States could have overcome Baghdad's objections if the administration was committed to a presence in Iraq. "The Obama administration was very lukewarm about staying in Iraq," said Stephen Biddle, a professor of political science and international affairs at George Washington University.

The Trump administration is more inclined to have a long-term presence in Iraq. "The U.S. government has a strong interest in remaining," Jeffrey said.

Senior members of Trump's administration, including Defense Secretary Jim Mattis, National Security Adviser H.R. McMaster and John Kelly, the White House chief of staff, have extensive experience in Iraq and relationships with officials in Baghdad.

The United States can avoid the pitfall of pressuring Baghdad to sign a so-called status of forces agreement. That requirement triggered a political debate in Iraq in 2011 that ultimately derailed continued U.S. presence there.

"We don't really need and should not insist upon such a formal agreement," said Michael O'Hanlon, an analyst at the Brookings Institution.

U.S. forces are currently operating under a less formal agreement between the two countries and could continue under the same arrangement, Jeffrey said.

The political environment in Baghdad has also changed since 2011. Iran still holds considerable sway in Baghdad, but the threat from ISIS has highlighted the need for international help.

Iran remains opposed to any continued U.S. presence, but Washington should be able to convince Baghdad to override Tehran's objections, Jeffrey said.

Jeffrey said the presence of U.S. forces would likely be less than 5,000. Currently the United States has about 5,500 U.S. troops in Iraq, serving primarily as advisers and trainers.

Funk said the U.S.-led coalition is still pursuing what is left of the Islamic State. The militants will try to put up an organized resistance in their remaining stronghold along the Euphrates River, he said.

Estimates of their strength range between 3,000 and 7,000 fighters in Iraq and Syria, down from a peak of more than 25,000 in 2015.

Most of their leaders have been killed or fled. “They’re kind of rudderless right now,” Funk said.

More:Defeat of ISIS in northern Iraq town marks milestone in campaign to eliminate group

More:ISIS 'capital' Raqqa falls to U.S.-backed forces. What it means for terror group's future