"The Joint Operations Command announces the complete liberation of the Rutba district," it said in a statement.
Special forces, soldiers and police took part in the operation, the statement said.
Iraqi forces launched the drive to retake Rutba, located in western Anbar province along the main road to Jordan, on Monday.
IS overran large areas north and west of Baghdad in June 2014, and later made further advances in Anbar, seizing its capital Ramadi in 2015.
More From This Section
But parts of Anbar - including its second city Fallujah - are still under IS control, as is most of Nineveh province, to its north.
The US-led coalition, which provided air support for the Rutba operation, stopped short of saying the town was under the full control of Iraqi forces.
Asked if there were still IS fighters in the area, coalition spokesman Steve Warren said: "There's still quite an amount."
In the course of the operation, Iraqi forces encountered "light to moderate resistance", he told AFP.
"They've got enough fighters, they've got tribal forces there, they'll hold it just like they've held every single other thing they've taken," he said.
In a briefing to Pentagon reporters yesterday, Warren described Rutba as a small town with "outsized strategic value".
"Rutba lies on the main route between Baghdad and Jordan, and opening it will impact the economies of both Iraq and Jordan, and will deny (IS) a critical support zone as well," he said.
The two major cities still under jihadist rule are Fallujah, which lies only 50 kilometres west of Baghdad, and Mosul, the capital of Nineveh.