President Donald Trump hailed the U.S.-backed coalition's retaking of Mosul from ISIS control in what he called a 'victory over terrorists who are the enemies of all civilized people.

He saluted joint U.S., coalition, and Iraqi effort to end the 'nightmare' of brutal ISIS rule over Iraq's second-largest city, which Iraqi authorities also hailed Monday.

The retaking of the bombed-out city came after a nine-month operation whose onset preceded the start of his term.

'Today, Iraqi Security Forces, supported by the United States and the Global Coalition, liberated the city of Mosul from its long nightmare under the rule of ISIS,' Trump said in a statement released by the White House.

'We congratulate Prime Minister Haider al-Abadi, the Iraqi Security Forces, and all Iraqis for their victory over terrorists who are the enemies of all civilized people,' Trump said.

President Donald Trump hailed the U.S.-backed coalition's retaking of Mosul from ISIS control

'We mourn the thousands of Iraqis brutally killed by ISIS and the millions of Iraqis who suffered at the hands of ISIS. We grieve with the Iraqi people for the loss of the heroic soldiers and Peshmerga who gave their lives to restore life to their country, and we honor their sacrifice,' Trump said, recognizing Kurdish forces who assisted the effort.

'We in the United States and the Global Coalition are proud to stand with the Iraqi Security Forces and all those who made this moment of liberation possible,' he said, praising a force that drew ridicule in the U.S. for putting up insufficient resistance when ISIS swept across Iraq.

Iraq's prime minister Haider al-Abadi addresses forces from a small base on the edge of Mosul's Old City, where heavy clashes have been underway for days, Monday, July 10, 2017. Al-Abadi returned to Mosul Monday and declared victory against the Islamic State group in the northern city following nine months of grueling urban combat

Iraqi people with tears in their eyes celebrate the liberation of the embattled city of Mosul in Baghdad, Iraq on July 9

How Islamic State has been pushed back in the battle for Mosul.

'We have made tremendous progress against ISIS – more in the past 6 months than in the years since ISIS became a major threat,' Trump said. 'The victory in Mosul, a city where ISIS once proclaimed its so-called “caliphate,” signals that its days in Iraq and Syria are numbered. We will continue to seek the total destruction of ISIS,' he said.

Trump made no public appearances Monday and there was no televised White House press briefing, leaving the printed statement the only communication from the White House on the matter Monday night.

The invasion was planned and began during the end of the Obama administration.

Iraq on Monday declared "total victory" over the Islamic State in Mosul, retaking full control of the country's second-largest city three years after it was seized by extremists bent on building a global caliphate.

This soldier held up two fingers to celebrate the success of the offensive against the Islamic State, which has held the city for the past three years

Iraqi people with tears in their eyes celebrate the liberation of the embattled city of Mosul in Baghdad, Iraq on July 9

"This great feast day crowned the victories of the fighters and the Iraqis for the past three years," said Prime Minister Haider al-Abadi, flanked by his senior military leadership at a small base in western Mosul on the edge of the Old City. Iraqi forces had backed the last pockets of Islamic State militants against the banks of the Tigris River.

Al-Abadi alluded to the brutality of the battle for Mosul - Iraq's longest yet in the fight against IS - saying the triumph had been achieved "by the blood of our martyrs."

The nearly nine-month campaign, which was backed by airstrikes from the U.S.-led coalition, left thousands dead, entire neighborhoods in ruins and nearly 900,000 displaced from their homes.

Shortly after al-Abadi's speech, the coalition congratulated him on the victory but noted that parts of the Old City still "must be back-cleared of explosive devices and possible ISIS fighters in hiding." ISIS, ISIL and Daesh are alternative acronyms for the Islamic State group.

Earlier in the day, airstrikes pounded the last IS-held territory on the western edge of the Tigris, Humvees rushed the wounded to field hospitals and soldiers hurriedly filled bags with hand grenades to ferry to the front.

Statement by President Donald Trump on liberation of Mosul Today, Iraqi Security Forces, supported by the United States and the Global Coalition, liberated the city of Mosul from its long nightmare under the rule of ISIS. We congratulate Prime Minister Haider al-Abadi, the Iraqi Security Forces, and all Iraqis for their victory over terrorists who are the enemies of all civilized people. We mourn the thousands of Iraqis brutally killed by ISIS and the millions of Iraqis who suffered at the hands of ISIS. We grieve with the Iraqi people for the loss of the heroic soldiers and Peshmerga who gave their lives to restore life to their country, and we honor their sacrifice. We in the United States and the Global Coalition are proud to stand with the Iraqi Security Forces and all those who made this moment of liberation possible. We have made tremendous progress against ISIS – more in the past 6 months than in the years since ISIS became a major threat. The victory in Mosul, a city where ISIS once proclaimed its so-called “caliphate,” signals that its days in Iraq and Syria are numbered. We will continue to seek the total destruction of ISIS. Advertisement

Iraqi troops had slowly pushed through the narrow alleyways of the Old City during the past week, punching holes through walls and demolishing houses to carve supply routes and fighting positions in a district where many of the buildings date back centuries.

For days, the remaining few hundred militants held area measuring less than a square kilometer (less than a mile), and Iraqi commanders described victory as imminent.

Al-Abadi also visited Mosul on Sunday, congratulating the troops on recent gains but stopping short of declaring an outright victory as clashes continued.

The drawn-out endgame in Iraq's fight for Mosul highlighted the resilience of the extremists and the continued reliance of Iraqi forces on air support to retake territory.

The Prime Minister yesterday visited a military base in western Mosul where he congratulated the Iraqi Forces and its civilian population after reportedly defeating ISIS jihadists

Al-Abadi proclaimed 'victory' over ISIS following a massive airstrike against the terrorists still holed up in the city

Iraqi commanders said gains slowed to a crawl in recent days as IS fighters used their families - including women and children - as human shields. As the battle space constricted, the coalition began approving airstrikes, dropping bombs of 200 pounds or more on IS targets within 50 meters (yards) of friendly forces.

Plumes of smoke Monday grew larger than the strip of territory under IS control.

Over the campaign, the Iraqi special forces who largely led the assault have faced casualty rates of 40 percent, according to a report in May from the office of the U.S. secretary of defense. Iraq's army, federal police and mostly Shiite government-sanctioned militia forces also suffered significant losses.

As the Iraqi army celebrated imminent victory on Sunday, Muhammad Abdul Abbas, a 20-year-old solider, said he lost 15 close friends fighting for Mosul.

Government troops raised an Iraqi flag in the city to celebrate their victory while the Prime Minister called for a 'feast day'

"Honestly, all this death and all this destruction, I don't believe it was worth it," he said.

Reports of civilian casualties also rose as Iraqi forces punched into Mosul's western half in February. Residents fleeing the fighting reported that entire families sheltering in the basements of their homes were killed by airstrikes targeting small teams of IS fighters.

Thousands of civilians were estimated to have been killed in the fight for Mosul, according to Nineveh's provincial council. That did not include those still believed buried under collapsed buildings.

More than 897,000 people were displaced, and the U.N. said there was no end in sight to the humanitarian crisis in Iraq despite the conclusion of the fighting.

The U.N. said thousands of Mosul residents will probably not be able to return to the city because of "extensive damage caused during the conflict."

Iraqis celebrate in Tahrir square while holding national flags in Baghdad, Iraq, Monday, July 10, 2017. Iraqi Prime Minister Haider al-Abadi declared victory against the Islamic State group in Mosul Monday evening after nearly nine months of largely grueling urban combat. (AP Photo/Karim Kadim)

Iraqis celebrate while holding national flags in Tahrir square in Baghdad, Iraq, Monday, July 10, 2017. Iraqi Prime Minister Haider al-Abadi declared victory against the Islamic State group in Mosul Monday evening, after nearly nine months of largely grueling urban combat. (AP Photo/Karim Kadim)

The infrastructure in western Mosul, where the fighting was fiercest, has been decimated. Iraq's civil defense rescue teams - a branch of the Interior Ministry - said about 65 percent of the buildings in the Old City were severely damaged or destroyed. In western neighborhoods like Zanjili, destruction was estimated to be 70 percent of all houses, buildings and infrastructure.

Mosul fell to IS militants within a matter of days in June 2014, starting a political and security crisis not seen in the country since the 2003 toppling of Iraqi leader Saddam Hussein.

The territorial gains by the extremists led to the ouster of Iraq's top leaders, dramatically shifted the balance of power among its security forces, empowered Iranian-backed fighters who are now sanctioned by the central government, and brought U.S. ground troops back onto Iraqi soil for the first time since 2011.

The road to retake Mosul has taken the government, its security forces and the coalition more than three years of training troops to replace the tens of thousands of Iraqi forces who dissolved in the face of the 2014 IS advance.

That summer, IS leader Abu Bakr al-Baghdadi, appeared at Mosul's al-Nuri Mosque and declared a caliphate on territory it seized in Iraq and Syria.

Last month, as Iraqi troops closed in on the Old City, the militants destroyed the al-Nuri Mosque and its famous leaning minaret to deny the forces a symbolic triumph.

Iraqis celebrate while holding national flags in Tahrir square in Baghdad, Iraq, Monday, July 10, 2017. Iraqi Prime Minister Haider al-Abadi declared victory against the Islamic State group in Mosul Monday evening, after nearly nine months of largely grueling urban combat. (AP Photo/Karim Kadim)

Iraqis celebrate while holding national flags in Tahrir square in Baghdad, Iraq, Monday, July 10, 2017. Iraqi Prime Minister Haider al-Abadi declared victory against the Islamic State group in Mosul Monday evening, after nearly nine months of largely grueling urban combat. (AP Photo/Karim Kadim)