Pro-government forces ousted IS jihadists from control of Adhaim dam, which forms a lake that marks the border between the eastern provinces of Diyala and Salaheddin, earlier this week.
Commanders from the army and the Shiite Badr militia that jointly led the operation told an AFP journalist who visited Friday that IS pulled out after a brief battle two days earlier.
"Thanks to the mujahedeen of the army and Badr, we have taken control of the site and have cleared it completely," said Badr commander Kadhem Husseinawi.
Ali Hussein, a soldier with the 5th Brigade, said the fighting only lasted a few hours but that it would take some time to defuse all the booby-traps left behind.
Most of the dam's vital infrastructure was intact, as was the administrative headquarters, but some of the staff lodgings that IS fighters had occupied were destroyed.
In the back yard of one of those houses, in a bunker the IS used to store food and ammunition, Badr fighters wearing their trademark green bandanas flashed victory signs.
The pro-government forces seized at least 10 vehicles, including Humvees and armoured personnel carriers, and destroyed four others during the operation, which involved mortar fire and strikes by helicopters and jet fighters.
One soldier said the operation began with the capture from IS of two of the four mainly Sunni villages near the dam, with the other two being seized afterwards.
Ground troops advanced by communicating to helicopters the coordinates of suspected bombs planted on the road, which were fired on and detonated to clear the way.
Signup to our newsletter and follow us on Facebook and Twitter!
The bodies of at least eight jihadists were still visible near the shores of the lake, including one whose head was missing.
Former minister Hadi al-Ameri, who commanded the Badr forces in Adhaim Wednesday, claims that IS sometimes decapitates its own dead before pulling out of an area to prevent their identification.
Husseinawi showed a warehouse IS had used as a workshop to rig vehicles with explosives for car bomb attacks.
One suicide bomber detonated a Humvee during the fighting Wednesday, killing three soldiers, including a colonel, he said.
Adhaim dam, located about 130 kilometres (85 miles) northeast of Baghdad, has a width of 3,800 metres (2.4 miles).
Construction of the dam began in 1989 to provide hydroelectric power, as well as flood control and irrigation. However, work was never completed, and no electricity has ever been generated there.
A main focus for the government since it lost swathes of land in a bruising June offensive by the jihadists has been to retake or protect the country's most vital facilities.
On Saturday, pro-government forces broke a months-old siege on Iraq's largest oil refinery near Baiji.
And in August, Kurdish and federal troops backed by US air strikes retook Mosul dam, the country's largest, in the north.
Significant Iraqi and foreign resources have been poured into retaining control of Haditha dam, one of the last areas still under government control in the western province of Anbar.