Militants of the Islamic State group hold up their weapons and wave flags. (Uncredited/Associated Press)

Vera Mironova is an International Security Fellow at Belfer Center at the Harvard Kennedy School.

For much of the past year, I’ve lived a double life. I’ve embedded within Iraq’s Special Operations forces throughout the battle of Mosul, witnessing first-hand a truly remarkable struggle against the Islamic State. But I’ve also continued my four-year field research into the Islamic State, interviewing the group’s fighters and supporters to understand the conflict through their eyes.

This double life has led me to a singular perspective: As encouraging as it has been for coalition forces to make so much headway, winning conflicts and taking back land won’t stop the Islamic State for long. Only widespread change in governmental policies can do that. Local policies dealing with Islamic State militants, ex-fighters and potential recruits lag behind the curve not only in Iraq, but also in almost every country from Southeast Asia to Western Europe.

In countries such as Libya, Yemen, the Philippines, Nigeria and Somalia, governments have little physical control over parts of their territories, which makes them easy territorial targets for the Islamic State. But countries with too much control — the Caucasus, Central Asian republics and some African nations — also contribute to the crisis by making life so unbearable for citizens that they leave to find a better life in the group’s caliphate.

It should come as no surprise then that one of the biggest groups of Islamic State foreign fighters (and their families) are Uzbeks. Uzbekistan has a freedom-ranking similar to North Korea and, according to human rights organizations, "wide-scale violation of virtually all basic human rights."

In the places where governments cannot fulfill their duties to provide for and protect civilians, not only can a relatively well armed group easily take control, the local population, tired of bad government, will not resist a takeover. Often, people even welcome it. In a 2016 survey of post-Islamic State territory in Iraq that I conducted, 30 percent of civilian respondents said security and policing actually improved under the Islamic State, compared with only 5 percent who said that it had become worse. The extremist group was not only strong enough to take the territory, it was also capable of governing it — and in some places, still is.

While recent military successes have given governments a chance to address issues such as rampant corruption, there are few signs of improvement. There was so much corruption among Iraq’s security forces that al-Qaeda used it to its advantage. If it wanted to target a civilian for recruitment, it would report that person to Iraq’s internal security as an al-Qaeda member. The civilian would then be arrested, thrown in prison, beaten and tortured. He would likely only be released after his family paid money through extortion. After such an experience, civilians are often more than ready to volunteer for any anti-government movement.

Overly controlling countries have also not changed — and in some cases have even gotten worse. Many governments have further cracked down on religion and personal freedoms in response to the Islamic State. By doing so, they have not only increased grievances among those most likely to fight but also pushed those people underground.

Although successful military operations have pushed back the Islamic State’s territorial conquest and won time for government reform, that time window is short. The Islamic State is exploring areas with weak security all over the world (even as far away as the Philippines) and is even trying to regain territory in recently-liberated areas of Iraq. Members are either waging insurgency war in remote rural areas or hiding in towns to prepare for future attacks.

The Islamic State isn’t currently gaining new ground, but the potential for gaining new fighters waits in the wings. Enter the next generation of extremists: local Sunni civilians who lost everything in the war and are already afraid for their safety, and a new enlistment of young, smart sympathizers who can use their expertise in engineering, science and the military to serve the goals of an armed group.

The next Islamic State, commanded by experienced fighters thirsty for revenge, would be more deadly and more widespread. The anti-Islamic State coalition in Iraq and Syria is dominating the region through air power, but extremists have already begun developing their own drones. Today, these drones are made of recycled plastic and duct tape; next time, they could well be more dangerous.

Looking at ongoing operations, both a former Islamic State foreign fighter and I have reason to be optimistic. I am optimistic that the Iraqi government will regain control of the territory. And he is optimistic that his former brothers-in-arms will finally go to heaven — and that new fighters will come to take their place.