Iraqi Prime Minister Haider al-Abadi has declared victory over the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) armed group in the northern city of Tal Afar and the entire province of Nineveh.

US-backed Iraqi forces launched an offensive against ISIL fighters, who had been holding Tal Afar for three years, on August 20.

“Tal Afar has been liberated,” Abadi said in a statement on Thursday, congratulating the Iraqi security forces.

“We say to the Islamic State fighters: wherever you are, we are coming for you and you have no choice but to surrender or die.”

OPINION: Post-ISIL Iraq – Breaking the cycle of violence

Al Jazeera’s Osama Bin Javaid, reporting from the northern Iraqi city of Erbil, said the loss of Tal Afar and the northern province is a big blow to ISIL.

“The loss of Nineveh province is crucial because this is where ISIL declared its caliphate,” Bin Javaid said.

“This province was also the engine of the ISIL economy. It is where they used to smuggle oil to other areas. It is also where they used to generate big revenues in terms of taxes,” he added.

Iraqi forces had been waiting to clear the small town of al-‘Ayadiya, 11km northwest of Tal Afar, before declaring complete victory in the offensive. ISIL fighters had retreated to the town and put up heavy resistance.

‘Very difficult battle ahead’

Tal Afar and the surrounding area were among the last pockets of ISIL-held territory in Iraq after victory was declared in Mosul, the country’s second-largest city, in July.

The city is located some 70km west of Mosul and about 150km east of the Syrian border, sitting along a major road that was a key ISIL supply route. It had a population of about 200,000 before ISIL captured it in 2014.

Last week, the Iraqi army said it believes some 10,000 civilians remain inside the city, adding that it had secured safe corridors for them.

READ MORE: ISIL’s smouldering footprint in Qayyara

Officials with the US-led coalition said the recapture of Tal Afar would spell the end of ISIL in northern Iraq.

Yet, they cautioned that victory over ISIL cannot be declared unless “ISIL is pushed out of every pocket it holds” in the country, including in their stronghold of Hawija, a town in Kirkuk province around 300km north of Baghdad that is expected to be new the new frontline against the group, and in the vast Anbar desert in the south near the border with Syria and Saudi Arabia.

“There is going to be a very difficult battle ahead for the Iraqi forces because they are now moving away from urban areas and going to areas where ISIL can easily camouflage itself,” Bin Javaid said.

The new frontline against ISIL

Challenges ahead

Dlawer Ala-Aldeen, president of the Middle East Research Institute, described the retaking of Tal Afar as “a big milestone to celebrate”, but added that it was “by no means the end”.

“It’s actually the beginning of the bigger political and administrative issues that will follow,” he told Al Jazeera from Britain’s capital, London.

“When you get rid of the last stronghold you pay the way for reconstruction, reconciliation and all the process of recovery, as well as people getting to their houses,” Ala-Aldeen added.

“But actually that is it, because the next is the biggest challenge: providing security and services and dealing with the many armed groups.

“And, of course, there is the big challenge of Hawija – by no means the fighters in Mosul would have disappeared altogether because ISIL in Hawija and the Kirkuk area are actually more prominent, more visible and provoking greater excursions and reactions.”

Source: Al Jazeera and news agencies