DUBAI The Mosul Dam was always meant to be a symbol of Iraq's grandiose ambition to escape poverty and underdevelopment.
But from the start, the $1.5 billion barrier north of the city was beset with significant engineering problems, now made worse after it became the center of a battle between Islamist insurgents and U.S. and Iraqi forces.
Despite its structural faults, the country's biggest dam at 3.6 km long, built by a German-Italian consortium in the 1980s, is a vital water and power source for Mosul, Iraq's largest northern city of 1.7 million residents.
Control the dam and you control the 'keys' to the city. With that in mind, Islamic State insurgents who captured swathes of Iraq and Syria and declared a caliphate, wrested control of the dam from Kurdish forces in recent weeks.
Fears grew that the militants could damage the dam, which can hold more than 11 billion cubic meters of water.
While Iraqi and Kurdish forces recaptured the dam with the help of U.S. air strikes on Monday, "the most dangerous dam in the world" - as a U.S. Army Corps of Engineers report described it - still has the potential for catastrophe.
The bleakest scenario foresees a complete breach that could unleash a tidal wave that would submerge Mosul under 25-30 meters of water and kill up to half a million people. Baghdad could be under 5 meters of water.
That would put it almost on par with the 1938 Yellow River flood when Chiang Kai-shek opened the dikes to halt the advance of Japan into China, in an incident that was said to have killed between half a million and 900,000 people.
The engineers involved in the Mosul project could not have known the dam would become the center of a battle three decades later, but the structural problems were always there.
The dam, about 45-50 km north of Mosul, was built on the wrong kind of geological foundation, which included gypsum - a soft substance which is the main element in plaster and not solid enough to handle the weight of the dam.
A person who worked with German firm Hochtief, the lead firm involved in the construction in the 1980s, said: "Inside Hochtief, it was seen as the group's worst construction site ever."
"Geologically, gypsum does not count as rock. It's sediment, as soft as butter. In physical terms, it's a viscous liquid. The whole soil is like Swiss cheese," the person, who declined to be named, told Reuters in Frankfurt.
To combat this and to ensure the dam doesn't give way, it needs round-the-clock grouting - a process where spaces that form in the foundations are filled with concrete.
Richard Coffman, an assistant professor of civil engineering at the University of Arkansas who has conducted extensive research on the dam, says grouting normally takes place six days a week, 24 hours a day.
"If the grouting program stops for a couple of weeks then we will start to see more dissolution of the bedrock foundation .... and possibly it could completely undermine the dam and water could be released from the reservoir."
The water could reach Mosul in 3-1/2 hours, he said.
Salar Ismael, a construction engineer who is part of the grouting team, said that grouting had stopped three days ago.
"The dam definitely requires almost daily grouting to make sure the foundation stays intact and stable," said Ismael who left the dam on Sunday, fearing for his life.
He said security forces had urged engineers to resume grouting, but they refused unless "the situation gets better and our safety is totally guaranteed".
"A second week of no grouting work will jeopardize the dam and force it to buckle under water pressure," said Ismael, who added that the cement they use is of bad quality.
Iraqi engineering geological expert Whael Matti put it starkly: "If no urgent maintenance and overall rehabilitation work is started soon, dam failure will be inevitable."
After the U.S.-led invasion of 2003, U.S. army engineers visited the site to make recommendations on its improvement.
They drilled thousands of holes and then pumped concrete slurry under pressure to fill the fractures.
Hasan al-Rizzo, the Iraq representative at the International Association of Hydrological Science, said there would not just be flood damage. Iraq would also lose its strategic reserve of water needed for irrigation and electricity generation.
While now the scene of heavy fighting, at the height of construction, the area surrounding the site was home to thousands of foreign workers.
The luxurious camp site included lavish homes, swimming pools, squash courts and football fields.
"There were plenty of things to do when you had your day off. We played football against Mosul University," said a Scottish engineer who worked on the project from 1983-1988.
"We did not really want for anything because everything was brought in from Europe," the engineer, who lives in Dubai, told Reuters, and who said Saddam Hussein visited the project.
Indeed, Giuseppe Catani, who worked as a finance director for one of the firms on the project, said the construction site was like a town. "People from different places would call their quarters, 'Little Italy,' and Little Paris."
"For the Iraqis, having one of the biggest dams in the world was a really proud thing," he said.
Those days are long gone.
General Halgurd Hikmat, a spokesman for Kurdish peshmerga fighters opposed to Islamic State, said the militants had laid mines and explosives inside the dam.
"We will protect it. We have advanced and heavy weaponry that is now positioned on the dam and our special forces are there," he said.
But protecting the dam is easier said than done due to its size and remote location.
John H Hollis IV, a senior security adviser, accompanied the U.S. Army Corps of Engineers and Kurdish and Iraqi government officials to the dam more than 10 times between 2004 and 2006 to conduct operations on stabilizing the dam.
On many occasions, their convoy came under ambush from roadside bombs and small arms fire by al Qaeda.
"It's an extremely large area and it's a very difficult area to secure because of the nature of the geographical layout," he told Reuters in Dubai.
He said Islamic State militants were able to easily overrun the area because there wasn't proper protection. A large, permanent military presence with air surveillance was needed to guarantee its security, otherwise: "You can expect the same thing to happen again ... when they think it's the right time to attack, they'll attack again."
(Additional reporting by Ahmed Rasheed in Baghdad, Isabel Coles in Arbil, Christoph Steitz in Frankfurt, David Alexander in Washington; Writing by Yara Bayoumy; Editing by Giles Elgood)