Iraq has finalised a deal with an Italian company to repair a large dam located near the frontline with the Islamic State (Isis) group, after the US government warned it may collapse, wreacking havoc through the country. Italy's Trevi group confirmed to IBTimes UK it has signed a €273m (£210m, $296m) contract to fix the Mosul dam, Iraq's largest.

A starting date for the works that are expected to last 18 months has not been announced yet but the Iraqi government stressed urgent action was needed to salvage the compromised structure. Pressure on the dam is expected to increase as more water will flow into the Tigris River with mountain snow melting away in milder spring temperatures.

Iraqi government spokesman, Saad al-Hadithi, told AP works needed to begin "as quickly as possible." The urgency of the repairs was highlighted by the American embassy in Baghdad that on 28 February said the dam was facing "a serious and unprecedented risk of catastrophic failure with little warning".

Built in the 1980s, the facility is a key source of water and energy for the nearby city of Mosul, which is under Daesh (IS) control. It fell into the hands of the jihadi group in 2014 but was seized back by Kurdish militias supported by US airstrikes a few months later.

When IS conquered the site fears were raised it would blow it up to unleash a massive tidal wave that could have caused severe flooding from Mosul all the way down to Baghdad, which lays 400km to the south.

The same doom scenario could be unleashed by a collapse of the damaged structure. "A catastrophic breach of Iraq's Mosul Dam would result in severe loss of life, mass population displacement, and destruction of the majority of the infrastructure within the path of the projected floodwave," a US government fact sheet said.

The Italian government has pledged to deploy a 450-strong military contingent to secure the area and provide protection for the Trevi team. "We would also like to acknowledge the considerable efforts of the Italian government in supporting ongoing efforts to stabilize the dam," the US embassy wrote.

The repair contract had already been agreed in principle in December but not immediately concluded. Trevi said works will include strengthening the dam's foundations and restoring damaged bottom outlet tunnels. "Intense level of drilling activities and will take place for the consolidation of the foundations of the dam," the company said in a statement.