Tal Afar was the last major population centre in northern Iraq still under jihadist control and its loss deprives IS of what was once a key supply hub between its territory in Syria and Iraq.
"Our happiness is complete, victory has arrived and the province of Nineveh is now entirely in the hands of our forces," said a statement from the office of Prime Minister Haider al-Abadi.
After 12 days of fighting, Abadi announced that Tal Afar had "regained its place in the national territory".
IS has lost much of the territory it controlled in the two countries and thousands of its fighters have been killed since late 2014, when the coalition was set up to defeat the group.
Also Read
IS fighters in Iraq now control only the city of Hawija and a few areas in the desert along the border with Syria.
IS jihadists overran Tal Afar, a Shiite enclave in the predominantly Sunni province, in June 2014.
At the time Tal Afar had a population of around 200,000, but officials said when the battle to recapture the city was launched on August 20 that it was unknown how many remained.
The deputy commander of the US-led coalition, British Major General Rupert Jones, has said the fall of Tal Afar would spell the end of IS in northern Iraq.
"The liberation of this city, and the remainder of Nineveh province, will essentially end ISIS's military presence in northern Iraq," Jones said, using another acronym for IS.
Authorities had accused the approximately 1,000 jihadists believed to be in the city when the operation was launched of using civilians as human shields during Iraqi and coalition air strikes.
Progress in Tal Afar was far more rapid than in Mosul, which fell to Iraqi forces only after a gruelling nine-month battle that began in October 2016.
IS has also suffered major losses in Syria, where US- backed fighters have retaken more than half of the group's de facto Syrian capital Raqa.
But the battle for Hawija is expected to be more complicated because of its location.
Disclaimer: No Business Standard Journalist was involved in creation of this content