Iraq declared on Thursday that its forces had retaken the northern city of Tal Afar and the surrounding region in another major victory over Islamic State group militants.
Tal Afar was the last major population centre in northern Iraq still under militants 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".
The full recapture of Nineveh province comes weeks after Iraqi forces backed by a US-led coalition ousted IS from its capital Mosul, three years after the militants declared a self-styled "caliphate" straddling Iraq and war-torn Syria.
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.
IS fighters in Iraq now control only the city of Hawija and a few areas in the desert along the border with Syria.
IS militants overran Tal Afar, a Shiite enclave in the predominantly Sunni province, in June 2014.
The city lies around 450 kilometres (240 miles) northwest of the capital Baghdad and about 70 kilometres (40 miles) west of Mosul, Iraq's second city.
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.
Officials have said the capture of Tal Afar would make it even more difficult for the militants to transport fighters and weapons between Iraq and Syria.
Authorities had accused the approximately 1,000 militants 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.
Iraqi authorities are now expected to launch a new offensive against IS in their stronghold of Hawija, a town in Kirkuk province around 300 kilometres (185 miles) north of Baghdad.
But the battle for Hawija is expected to be more complicated because of its location.