After days of mounting expectation, the Iraqi government announced a serious offensive to retake the city of Ramadi, the capital of western Iraq’s Anbar Province, from Islamic State.

This is far from the first announcement of the imminent recapture of Ramadi, occupied by IS since May 2015 after months of attacks. However, the Iraqi military and allied militias have been foiled before by IS’s tactics of improvised explosive devices, bomb-laden trucks, and booby traps, as well as the destruction of all major bridges into the city.

This has only raised the stakes for the reclaiming of Ramadi. Strategically, it is the “vein of Baghdad”, which is just over 100km to the east, and is close to the holy city of Karbala to the south and to the borders of Saudi Arabia, Syria, and Jordan. IS could use this position both to claim its ascendancy in Iraq – Ramadi is the capital of Anbar, the country’s largest province – and to maintain a route to Raqqa, its central position in Syria.

The loss of Ramadi further challenged the Iraqi Government’s already shaky authority. Thousands of Iraqi families were displaced, and many of them are still trapped on Bzeibiz Bridge. Amid fears that IS-linked men are among the homeless, officials have restricted access to the capital.

So the Iraqi joint military operations command declared its plans to retake the city – but only now has it begun to act on them.

Going in

The plan was that artillery bombardment by the Iraqi army and airstrikes by US-led forces would support a ground assault including Shia paramilitary units, some of them led by Iranian officers, and Sunni tribal fighters. In preparation, Anbar Province’s military command headquarters and the western Ramadi district of Tamim were retaken and occupied.

The final campaign was held up for weeks, ostensibly to give civilians the opportunity to evacuate the city. Then, on December 20, leaflets declared the final chance to leave in the next 72 hours, suggesting two routes for exit. Eyewitnesses and local sources said that IS was preventing departure in hopes of using residents as human shields.

The next day, after military engineers installed a floating bridge over the Warar River, Iraqi forces, including anti-terrorism units, advanced to the centre of Ramadi. Backed by the US-led airstrikes, the anti-terrorism forces announced the capture of the al-Bakr neighborhood to the south of the city, with fierce fighting in nearby areas such as al-Thubat and al-Aramil.

According to local sources, the governmental compound and several neighbourhoods are still under IS’s control. However, Iraqi military officers asserted that the entire city will be pacified by December 25.

The recapture of Ramadi would be another major setback for IS, which – despite its ability to project its threat in Iraq and beyond, as was made clear by last month’s Paris attacks – is a weakening force.

The militants have lost cities and towns such as Tikrit and Sinjar since the summer, and Ramadi’s fall could open the way for an assault on nearby Fallujah, a key strategic position which is also held by the group. IS could have to fall back on its main position in Mosul, Iraq’s third city. IS is also on the defensive in neighbouring Syria, having lost territory to Kurdish forces in the north and east and is finding it difficult to take territory from rebels.

With Baghdad and other cities in the south well-protected from a counter-offensive by IS, a successful campaign could help restore confidence in the Iraqi army, which was humiliated by the loss of territory to IS in Anbar at the start of 2014, its collapse in areas such as Mosul and Tikrit in June of that year, and the setback in Ramadi in May 2015. The return of thousands of displaced people to their homes will be hailed by Baghdad as a further sign of recovery.

But even if a military victory is secured, other challenges await – and they will take a lot of time and effort to overcome.

The challenges of success

Politically, as well as militarily, the Iraqi government needs to work with local federal police and tribes to hold the ground and impose security following the liberation. Iraqi officials have declared that this is all part of a comprehensive post-liberation plan, but this will also need to unite all efforts to rebuild the Iraqi army and enhance its role as the only legitimate, independent national institution. This is crucial not only for Ramadi and surrounding territories, but for the rest of Iraq.

The political challenge is closely entwined with social challenges. Since early 2014, IS has attempted to gain the support of local tribes. This outreach expanded as the group worked to quadruple its force from 4,600 to 16,000 between June 2014 and April 2015. And when the militants captured Ramadi in May 2015, they used the loudspeakers of mosques to urge people to drop their weapons and co-operate with them, and they soon pursued the recruitment of teenagers from the city.

At an economic level, the crisis Iraq is enduring will continue to dog future efforts to reconstruct infrastructure and the areas IS has devastated. This reconstruction is essential to reinforce security, to counter IS’s claim to be a better governing authority, and assuage any fears that the recapture of Ramadi is simply a power grab by a particular political or religious faction or outside power.

Worse still, Baghdad will have to organise these efforts in the face of falling oil prices, the disaster of over 3m internally displaced Iraqis, and a debate over prime minister Haider al-Abadi’s proposals to reduce government size and tackle corruption.

The recapture of Ramadi could give a short-term boost to a government exhausted from two years of defeat on the battlefield and accusations of mismanagement and failure to represent all Iraqis. But it will only have a lasting benefit – both for the people of Anbar and for the battle against IS across the country – if Iraq’s government can finally start to surmount the country’s sectarian divisions and begin manage to run the country properly.

Balsam Mustafa, PhD student in Modern Languages & Politics, University of Birmingham and Scott Lucas, Professor of International Politics, University of Birmingham

This article was originally published on The Conversation.