Iraq’s security forces made their biggest advances yet against the self-proclaimed Islamic State on Monday, taking back much of the Sunni-dominated city of Ramadi. But the significance of the victory, and what it means for the longer-term goal of defeating ISIS, remained uncertain.

It’s the biggest win for Iraq and its U.S. military partners so far against the terror group, but is in the city that ISIS held for the least amount of time, making it hard to assess the impact of the win.

U.S. military officials believe the Iraqi security forces, helped by 630 U.S.-led coalition airstrikes over five months, reclaimed the city government center and as much as 50 percent of the provincial capital of the Sunni-dominated and restive Anbar province.

But there was still fighting for control of the rest of the city, which could fall within days, defense officials said.

There was cautious optimism within the U.S. military that the loss of Ramadi, coupled with ISIS’s inability to make any major territorial gains in the past year, marked what one military official described a “tipping point” in the war to crush ISIS and wrest its control of territory stretching from Iraq across the border into Syria.

Iraqi government officials were quick to celebrate their win, perhaps prematurely. They initially claimed to control the entire city before correcting that statement. There are still pockets of Ramadi under ISIS control, U.S. and Iraqi officials stressed, though satellite images emerged showing the Iraqi flag flying over the government building in central Ramadi, replacing the ISIS flag.

“Liberated is in the eye of the beholder,” one U.S. military official told The Daily Beast.

What the Shiite-dominated Iraqi government in Baghdad does next in Ramadi will determine how enduring the military gains will be, analysts said. Will the government arm a local Sunni force and give the Sunni population a greater say in how the city is run? Will Baghdad rebuild the city such that many of its Sunni residents who fled in the face of ISIS’s occupation can return? Or will another jihadist group exploit the grievances of Iraq’s minority sect?

“What remains unclear is to what extent does Iraq play sectarian politics. One of the keys to long-term stability is to show the population that they have a place in Iraq,” Daveed Gartenstein-Ross, a senior fellow at the Washington, D.C.-based Foundation for Defense of Democracies, told The Daily Beast. “ISIS or not, the Sunnis’ grievances can empower other jihadist actors or even nationalist insurgent actors.”

The fate of Ramadi may also portend the future of an even bigger city that the Iraqi forces are trying to recapture.

“How the authorities in Baghdad govern Ramadi will be crucial to whether Mosul, the real bastion of IS, is liberated in 2016,” Bruce Riedel, a former CIA officer and counterterrorism expert at the Brookings Institution, told The Daily Beast.

That it took so long for Ramadi to fall doesn’t necessarily suggest a longer battle for Mosul, Iraq’s second-largest city and ISIS’s de facto Iraq capital. The city’s fall into ISIS hands in June 2014 sparked the U.S. campaign against the group, and many believe once Mosul falls, so will ISIS.

“Iraq is pointing toward Mosul as its next target, and that is legitimate. Mosul has become increasingly isolated,” Gartenstein-Ross said. “It’s hard to say that because it took five months to take Ramadi it will take long for Mosul. Where does the population stand? How much intelligence does the Iraqi have? …It could well be a very long slog.”

Some analysts resisted drawing too strong a parallel between the conflict in the two cities.

“Comparing the retaking of Ramadi to the fight to retake Mosul is comparing apples and fish,” Ioannis Koskinas, a retired Air Force officer and now a fellow in the International Security Program at New America, told The Daily Beast. Only a few hundred ISIS fighters in Ramadi were able to hold off Iraqi security forces for months amid hundreds of coalition airstrikes and a campaign that was months in the making, he said. “Mosul will be a much more difficult fight.”

The fight to retake Ramadi was halting and arduous. The city initially fell into ISIS hands shortly after Iraqi forces pushed the group out of the nearby city of Tikrit in March.

Then, in July, U.S. airstrikes began in Ramadi amid an Iraq-led push to weaken ISIS’s grip on the city. But local forces struggled to move forward, particularly since portions of the city were lined with booby traps and improvised explosives.

While ISIS may no longer have organized units in Ramadi, it may still be able to implant bombs and other explosive traps and thus pose an ongoing threat to stability in the city, Christopher Harmer, an analyst with the Institute for the Study of War, told The Daily Beast.

At times, the U.S. had to all but force the Iraqis to fight for Ramadi, raising questions about how committed those forces were and whether the Iraqis had help from Shiite militias or from Iran, which seeks to exploit the instability in Iraq to expand its influence over the country.

All told, it took five months of fighting for the city to fall. And as of Monday it was unclear how big a role the Shiite militias, with their Iranian backing, played. That’s a crucial question, because if the liberation of Ramadi is seen effectively as a Shiite project and a power play by Iran, it’s more likely to increase sectarian tension and further alienate a Sunni population whose assistance, analysts say, Iraq and the U.S. desperately needs to ultimately defeat ISIS.

Riedel said that initial reports the Shiite militias had been largely kept out of the battle for Ramadi was “a positive sign.” U.S. officials told The Daily Beast that the militias didn’t play a major role, though they couldn’t categorically say that none of those fighters had taken part.

“If the Sunnis are given respect and authority...it will facilitate further offensives against Daesh,” Riedel said, using an alternate name for ISIS.

One near-term question will be to what extent local Sunnis are empowered to play a role in Ramadi’s security.

“It is possible that ISIS has done such a horrible job at governance that Iraqi security forces now have a window of opportunity to establish Sunni security elements,” Harmer said. But as long as Iran’s military and “their Shia militia proxy are dominating the strategic arc of the conflict in Iraq, there is no possibility that Sunni security elements will be long-term loyal to the Baghdad government. Until Iranian influence in Baghdad is significantly reduced, there is no chance that there will be a genuine, lasting reconciliation.”

Observers are waiting to see where ISIS flees to next. The group has typically kept only a small garrison in territories where it has been confronted with tens of thousands of conventional and paramilitary forces. The city of Tikrit, for instance, contained just 300 to 450 ISIS militants who were nonetheless able to hold out against 30,000 pro-Iraqi troops, the bulk of them Shiite militias, for several weeks before U.S. air power finally tilt the balance to allow for Tikrit’s recapture last March. ISIS tends to withdraw en masse from areas it knows it cannot keep for very long.

According to U.S. military estimates, roughly 2,000 ISIS fighters were killed by coalition airstrikes and several hundred died in fighting with Iraqi forces just in the past few days. The remaining forces fled northeast, defense officials said.

Video courtesy of Yalla.