Iraqi and US diplomats have warned of a serious danger to millions of people around the giant Mosul dam, which is undergoing repairs and could breach at any moment, releasing a killer flood wave capable of wiping out entire cities and even flooding Baghdad.

Just as the UN has warned of up to 2 million people projected to be displaced in Iraq this year by the fighting with Islamic State (IS, ISIS/ISIL), an even more apocalyptic threat looms in the country’s largest dam on the Tigris River, which, according to TASS, could affect up to 6 million people, with as many as 2 million of them living in and around Mosul.

Iraq’s permanent representative to the UN Mohamed Ali Alhakim warned residents in and around the area of the Mosul Dam that it is in imminent danger of collapse, while describing the steps the Iraqi government had undertaken to lower the water level there.

“The Iraqi government took important precaution measures, having lowered the water level in the reservoir behind the dam to 307 meters (1007 feet). We called upon our citizens to be alert and cautious,” he said Friday, advising locals to “determine the safe distance from the dam in case it collapses.”

The Mosul Dam can hold up to 12.5 million cubic meters of water, and could flood swaths of land in the north of the country. In the worst case scenario, it would literally release a wall of water and debris, first burying the city of Mosul, which lies only 64 kilometers (40 miles) from the facility, and rolling up to 400 kilometers (250 miles) south, even reaching the capital.

The ISIS-occupied northern Iraqi city is currently home to between 750,000 and 2 million inhabitants, according to varying estimates. Before it was overrun by terrorists in 2014, its population was thought to be some 2.5 million people.

The US Embassy in Iraq on Sunday warned of a “serious and unprecedented risk of catastrophic failure with little warning” at the dam.

In February, the US estimated the number of possible casualties from 500,000 to 1.47 million people residing in the most dangerous area of the flood path, if they are not evacuated in time.

Although Iraqi authorities are being aided by the Italian engineering company Trevi Group, with which it struck a deal in March this year, the 3.2-kilometer (2-mile) dam rising 113 meters (371 feet) high could fail the increasingly complex maintenance.

The soil on which the dam, originally named after the late Iraqi leader Saddam Hussein, was built back in 1983, is severely eroded due to its unstable structure. In order to prevent dam from exploding, tons of concrete are being poured into the dam’s boreholes daily within the process known as “grouting.”

A brief 10-day capture of the dam by IS militants in August 2014 disrupted the grouting work for more than a month which made things much worse in terms of water containment. Although, the dam now stays under the protection of the US-led coalition forces, Mosul remains an IS stronghold with the group controlling a cement factory.

The immense challenge comes as the country experiences a full-blown humanitarian catastrophe being at the forefront of the fight against Islamic State, with a third of 37 million Iraqi population in need of aid.

“Nearly a third of the population – over 10 million people – now require some form of humanitarian assistance. The military campaign, depending on its scope and intensity will almost certainly lead to mass displacement in the months ahead,” Jan Kubis, the UN Secretary General’s Special Representative for Iraq, said Friday, estimating the number of people that can be forced to leave their homes by an Islamic State offensive at 2 million this year alone.

“In a worst case scenario, more than 2 million more Iraqis may be newly displaced by the end of the year,” Kubis said.