The town had been an insurgent bastion since the US-led invasion of 2003, earning it the nickname of 'Kandahar in Iraq'
Abadi declares victory in Hawija over ISIL
Iraqi prime minister Haider Al Abadi declared on Thursday victory over ISIL in the northern town of Hawija, one of two enclaves in the country still held by ISIL extremists.
Hawija was an insurgent bastion during the US-led invasion of 2003, earning it the nickname "Kandahar in Iraq" because of the ferocious resistance the town put up, similar to that of the Taliban stronghold in Afghanistan.
In response to Mr Al Abadi's announcement, the US-led coalition battling ISIL welcomed Iraq's "swift and decisive victory".
Lieutenant General Paul Funk, the commanding general of the coalition in Iraq, said: "Our Iraqi partners fought bravely and professionally against a brutal and determined enemy, safeguarding innocent civilians throughout the entire campaign".
The battle was hard fought and operations to liberate the city took 14 days, the coalition said. Many sources reported the surrender of more than 1,000 terrorists, it added.
On Thursday morning, Iraqi forces said they had retaken the centre of Hawija and were pushing forward in their assault on one of the country's last extremist enclaves.
Troops, police and paramilitaries "liberated the whole of the centre of Hawija and are continuing their advance", Lt Gen Abdel Amir Yarallah, who commands the operation, said at the time.
Government and allied forces, backed by a US-led coalition, launched an offensive last month to oust ISIL from Hawija.
Mr Al Abadi held talks with French president Emmanuel Macron in Paris on the campaign against the extremists. France is a member of the anti-ISIL coalition.
The United Nations on Tuesday said an estimated 12,500 people had fled Hawija since the offensive began last month. The number of people still in the town was unknown but the UN's humanitarian affairs office said there could be as many as 78,000.
The office added that humanitarian agencies had set up checkpoints, camps and emergency sites ready to accommodate the thousands who could flee.
Hawija, 230 kilometres north of Baghdad, was one of two significant areas still held by ISIL in Iraq, along with a stretch of the Euphrates Valley near the Syrian border, which is also under attack.
The town's mainly Sunni Arab population is deeply hostile both to the Shiite-led government in Baghdad and to the Kurds who form the majority in adjacent areas.
Hawija lies between the two main routes north from Baghdad. One leads to Mosul - Iraq's second city which was recaptured from ISIL in July — and the other goes to the city of Kirkuk and the autonomous Kurdish region.
Last year, government forces bypassed the area in their advance north to Mosul, which culminated in the extremists' defeat in their main Iraqi stronghold.
ISIL has been forced out of most of the territory it seized in Iraq and Syria during a lightning offensive in the summer of 2014 that was followed by its declaration of a so-called cross-border "caliphate".