Well, almost, anyway. Troops under Iraqi command cleared remaining ISIS terrorist fighters from a key government center in Ramadi this morning, the last major obstacle to liberating the city after almost two years of ISIS control. It’s not over yet, not in the short term — and probably not in the long term either:

Iraqi forces on Monday declared a key victory in their battle to retake the city of Ramadi from ISIS, seizing a central government compound in what the U.S. called a “proud moment.”

Brig. Yahya Rasool told state television that the Iraqi flag was flying over the complex, saying that the city had been “liberated” following a weeks-long fight against the militants.

This may be more aspirational than actual, at least for the moment:

Pockets of ISIS fighters were still believed to be holed up in the western city, a senior Iraqi security official. The official said on condition of anonymity that about 45 percent of Ramadi remains under militant control, mainly in northern and eastern districts that are now surrounded by government forces.

And a senior U.S. military official said the city of Ramadi was far from secure, with several heavily-mined neighborhoods still under ISIS control and in need of clearing.

“The fight there is far from over,” the official told NBC News. “Iraqi forces may still face heavy fighting within the next few days.”

The government announced the liberation of Ramadi on television, with an army officer as news reader:

It’s good news, but it took a very long time for the Iraqi army to get its act together in Ramadi, and it’s worth noting that this doesn’t change the status quo from late 2014, when Barack Obama pledged to degrade and destroy ISIS. Ramadi fell to ISIS seven months ago in May 2015, after an offensive in response to which the Iraqis sent a supposedly elite force to dislodge them. Despite having far superior numbers, the Iraqi army got routed, and fled while leaving most of their heavier arm — provided by the US — behind for ISIS to use against them. Haider al-Abadi then announced that the Iraqi army would fight again in Ramadi, only this time with Iranian-backed Shi’ite militias, whose morale is much higher than that of the official Iraqi military. That got nowhere, and Ramadi remained in ISIS hands.

This time, though, the Iraqis “largely” excluded the Shi’ite militias, according to the Washington Post. Instead, they finally engaged the Sunni tribal militias, who may have had enough of ISIS to ally for a spell with the Shi’ite dominated government in Baghdad. Control of the entire city is still under contention, so the question may be how long those tribal militias will stick with Baghdad:

The Iraqi military is attempting to repair its tattered reputation after defeats last year by the Islamic State, which seized about a third of the country. The military and pro-government forces have slowly clawed back land, but the fight for Ramadi is the first major battle in which Iraq’s powerful Shiite militias have largely been excluded, because of concerns about their presence in the largely Sunni city. That has allowed military forces a chance to prove that they can go it alone. Sunni tribal forces also have been used for the offensive, but largely for holding territory as it is retaken. …

Brig. Gen. Ahmed al-Belawi, an Iraqi police commander, said the remainder of Ramadi would take “a few days” to clear.

But some officials have expressed doubt that the city can be secured that quickly.

“It will take a long time to completely liberate the city,” said Eid al-Karboly, a spokesman for the provincial council of Anbar. He said that about 75 percent of central Ramadi was still under the militants’ control, including neighborhoods such as Mallab, where civilians are still thought to remain. This has complicated the U.S. air campaign, which has played a major role in the Iraqi advance.

“The enemy’s snipers are based on the roofs of houses with families,” said Maj. Gen. Ismail Mahlawi, the head of Anbar Operations Command. “Therefore, we can’t target them by airstrikes, which means it’s going to take some time.”

It’s one thing to take Ramadi; can the Iraqis hold Ramadi? If they rely the Sunni militias, that’s a very interesting question, and it depends on just how much political weight Sunnis will be allowed in the Iran-aligned Baghdad government. If the Iraqis rely only on their army, the morale is probably too low to maintain their grip in the long run, and may not hold up well in the coming house-to-house fight needed to eject ISIS from Ramadi entirely.

Besides, ISIS has proven itself to be remarkably resilient. The only way to ensure that Ramadi stays out of ISIS’ hands is to defeat them in other areas to prevent them from staging new forces to assault the city. That means driving them off their land in both Syria and Iraq, but the Iraqis don’t have the resources for such a fight and no one else has the will for it. Perhaps the Iraqis have found a way to cobble together their own version of the Anbar Awakening, but without real political access in Baghdad, it won’t last long — perhaps not even long enough to finish the job in Ramadi.