Is Ramadi the model for defeating IS in Iraq?
The Iraqi Security Forces (ISF) raised their national flag over the Anbar provincial government headquarters in Ramadi on 28 December, marking the return of government troops to the centre of the city after many weeks of intense fighting.
The self-styled Islamic State (IS) is now limited to hideouts in Sufia, the rural district to the north-east of the city, and in small "stay-behind" locations within the ruined urban centre.
There will be ongoing IS harassment in the city, including occasional suicide car bombings and spectacular raids to disrupt stabilisation, but the jihadist group is unlikely to fully control the city again in the manner it has since May 2015.
For IS the loss of Ramadi was inevitable almost from the start but permanent control was probably not their goal. Instead, IS has repeatedly used Ramadi to distract the ISF from attacking the Islamic State's stronghold in Mosul, 450km (280 miles) to the north.
IS tried and failed to seize Ramadi at the same time as nearby Falluja fell in late December 2013.
It fought a battle of attrition for 16 months from Ramadi's rural suburbs, tying down ISF units. Then, when the Iraqi military took Tikrit in April 2015, the Islamic State was able to crack ISF resistance in Ramadi and again use the city to draw ISF effort away from Mosul for 226 days and counting.
With the Ramadi operation beginning to wind down, IS knows that the main event - the battle for Mosul - will now begin.
IS could try another diversionary attack but the Iraqi and Syrian forces are now better prepared and supported with air power from the US-led coalition.
More likely, the slow preparatory phases of the battle for Mosul will now unfold in the first half of 2016.
First, IS' next defensive bulwarks will be ground down - the oil refining hub Qayyarah and other Tigris River Valley towns south of Mosul.
Then the city will be slowly encircled in the summer and air strikes will intensify on IS leadership and logistical targets. Then the assault will begin once the summer heat dies down in the autumn of 2016.
Though IS has benefitted from its use of Ramadi as a delaying operation, the ISF and coalition have also learned from the experience.
Ramadi saw the ISF and coalition work closely together to build highly detailed intelligence on enemy locations and then use air power to precisely target those concentrations.
Ramadi also saw the Iraqi army show off the training and equipment it has acquired from the coalition.
"Combined arms breaching" is one new capability - the ability to clear scores of improvised explosive devices in a single manoeuvre with the aid of US-provided mine-clearing equipment. Combat engineers with US-provided bulldozers rapidly consolidated defences and allowed troops to beat away IS counter-attacks.
The ISF showed that it could rapidly build new bridges to replace the ones that IS demolished. All these skills will be useful in Mosul.
The battle is the latest in a series of operations that show professional military commanders, not militia leaders, in charge of major military operations.
This was the case at Tikrit and Baiji, where militia leaders tried and failed to conquer the city for months. In the end, professional Iraqi special forces and army officers backed by coalition air power tipped the balance in both places within days.
This dynamic is important because Shia militia commanders like Abu Mahdi al-Muhandis, a US-designated global terrorist, or Hadi al-Amiri will probably seek to play key roles in the liberation of Mosul.
But local political dynamics - particularly the predominately Sunni Arab character of Mosul city - suggest that the Shia militias will not be welcomed as liberators, rather as foreign occupiers.
This makes it important that the assault on Mosul - like the decisive operations at Tikrit, Baiji and now Ramadi - should be an operation commanded by professional ISF leadership under national command.
A related challenge will be the Iraqi government's stabilisation of Ramadi city as the battle slowly winds down.
A newly-announced $50m (£33m) international effort to restore basic services in Ramadi plus plans to man the city's security forces with local Sunnis will have an important effect on resettlement of local people and the long-term stability of the city. The previous example of Tikrit gives reasons for encouragement.
Tikrit was heavily damaged in the fighting to liberate the city and looted by predominately Shia militias thereafter. But the post-battle stabilisation has gone unexpectedly well.
The UN Development Programme (UNDP) is running a successful resettlement programme that has seen Internally Displaced Persons returning to the city and the militias have acted with restraint.
Such a "day-after" resettlement and stabilisation plan will be doubly necessary in Mosul, a city 15 times as big as Tikrit and three times as large as Ramadi.
As a result, Ramadi may have given the Iraqi government and security forces a rare opportunity to better prepare for the main battle and post-conflict period in Mosul.
If Ramadi had not fallen, the ISF might have rushed to failure in Mosul. Although the process will probably be slow, the Iraqi campaign to liberate Mosul may now be on firmer ground.
Dr Michael Knights is the Lafer Fellow at the Washington Institute for Near East Policy. He has worked in all of Iraq's provinces, including periods spent embedded with the Iraqi security forces. His recent report on the Iraqi security forces is available via the Washington Institute website.