TAL AFAR, Iraq (Reuters) - Iraqi forces have retaken almost all of Tal Afar, Islamic State’s stronghold in the country’s northwest, the Iraqi military said on Sunday.

After just eight days of fighting, all 29 neighborhoods in Tal Afar city had been taken back from the militant group, the military said in a statement on Sunday.

However, fighting was ongoing in al-‘Ayadiya, a small area 11 km northwest of the city, where militants who fled the district’s city center were hiding out, Iraqi military spokesman Brigadier General Yahya Rasool said.

Iraqi forces were waiting to retake the area before declaring complete victory in the offensive, he said.

Tal Afar was the latest objective in the U.S.-backed war on the jihadist group following the recapture in July of Mosul, where it declared its self-proclaimed caliphate over parts of Iraq and Syria in 2014.

The offensive on Tal Afar, which lies on the supply route between Syria and the former Islamic State stronghold of Mosul, started on Aug. 20. Up to 2,000 militants were believed to be defending the city against around 50,000 attackers, according to Iraqi and western military sources.

Such a quick collapse of Islamic State in the city, which has been a breeding ground for jihadist groups, would confirm Iraqi military reports that the militants lack command and control structures west of Mosul.

Slideshow ( 2 images )

Residents who fled Tal Afar days before the start of the offensive told Reuters some of the militants looked “exhausted” and “depleted”.

Elite forces liberated the heart of the city on Saturday, and raised the national flag on top of the citadel building, the military said. Much of the Ottoman-era structure was destroyed by the militants in 2014.

A Reuters visual team visited the citadel on Sunday and saw signs of heavy damage to much of the structure.

“We tried to push out the militants without doing too much damage,” said a Shi’ite militia soldier fighting with the Iraqi forces who asked not to be named. “We only used light weaponry.”

Iraqi soldiers were seen celebrating Tal Afar’s recapture on Sunday, taking down IS flags from their perches in the city center and taking pictures mocking the militants.

Fighting had almost ground to a halt on Saturday, with just occasional artillery rounds heard. There was no sign of civilians in the neighborhoods Reuters visited on Saturday and Sunday.

Tens of thousands of people are believed to have fled in the weeks before the battle started. Remaining civilians were threatened with death by the militants, according to aid organizations and residents who managed to leave.

Tal Afar has experienced cycles of sectarian violence between Sunnis and Shi’ites after the U.S.-led invasion of Iraq in 2003, and has produced some of Islamic State’s most senior commanders.