Tal Afar and the surrounding area is one of the last pockets of IS-held territory in Iraq after victory was declared in Mosul, the country’s second-largest city, last month.
The city, 50 miles (80km) west of Mosul, lies along a major road that was once a key IS supply route.
Its capture would make it even more difficult for the jihadists to move fighters and weapons between Iraq and Syria.
Having retaken all 29 neighbourhoods in Tal Afar city, US-backed Iraqi troops are continuing to battle in a small area seven miles to the northwest where fleeing militants have taken refuge.
The military is waiting to retake this before declaring complete victory.
Up to 2,000 battle-hardened IS fighters were believed to be defending the city against a force of about 50,000 troops.
The assault was launched on 20 August after weeks of airstrikes and the rapid collapse of IS confirms intelligence reports of a breakdown in militant command structures west of Mosul.
Fleeing residents said the jihadists looked “exhausted” and “depleted”.
Nevertheless, pro-government forces have had to negotiate roadblocks, sniper fire and mortar shelling during the battle.
Troops also said they discovered a network of underground tunnels used by IS to launch attacks behind the lines of already retaken territory, or to escape.
Tens of thousands of civilians are believed to have fled in the weeks before the battle for the city started.
Those remaining civilians were threatened with death by the militants, according to aid organisations and people who managed to escape.
Once Tal Afar is retaken, Baghdad is expected to launch a new offensive on Hawija, about 185 miles north of the Iraqi capital.
The coalition has announced carrying out strikes near Hawija in recent days.
The militants have lost much of the territory it controlled and thousands of its fighters have been killed since late 2014, when the US-led international coalition was set up to defeat the group.
However, despite its losses in Iraq and Syria, IS has continued to claim responsibility for attacks carried out by its members or supporters abroad, including the deadly attacks in Spain and knife attacks in Russia and Brussels.