A member of the Iraqi Counter-Terrorism Service (CTS) walks through the rubble and broken wall of a damaged building.

The Iraqi government declared Thursday that Iraq was rid of ISIS after its forces reclaimed Mosul, the country’s second-largest city, from the terror group. There was just one problem: Almost no one agreed with the assessment that the war on ISIS in Iraq was all but over.

The US military said Thursday that at least three other ISIS-controlled Iraqi cities face the kind of military campaigns that have all but destroyed other cities in the push to free them. Aid organizations said life in Mosul remains fragile, even after its near liberation. And a report released Wednesday by a top counterterrorism research group noted that the liberation of Iraqi cities hasn’t ended ISIS’s threat to the country; according to the report by West Point's Combating Terrorism Center, there have been 1,468 ISIS attacks in Iraqi and Syrian cities after they’d supposedly been freed from ISIS control.

“Pushing the Islamic State out as the formal governing party in a territory is not a sufficient development when it comes to ending the group’s ability to enact violence against individuals in Iraq and Syria,” the report concluded.

Still, Iraqi officials celebrated what they called the recapture of Mosul, symbolized by Iraqi troops’ occupation Thursday of the al-Nuri Mosque, the historic site where ISIS leader Abu Bakr al-Baghdadi declared the creation of the Islamic State nearly three years ago and where ISIS sappers demolished its famed leaning al-Habda minaret only days ago. ISIS fighters now control only two areas in the city, both US and Iraqi officials said — the warren of streets immediately around the mosque and a hospital complex, both on the city’s west side.

"The return of al-Nuri Mosque and al-Hadba minaret to the fold of the nation marks the end of the Daesh state of falsehood," Prime Minister Haider al-Abadi said in a statement, using an Arabic term for ISIS.

Ahmad Al-rubaye / AFP / Getty Images

The destroyed Al-Nuri Mosque.

Brig. Gen. Yahya Rasool, an Iraqi military spokesman, reportedly told state television that the “fictitious state has fallen.”

Photos from the city showed Iraqi troops moving among the rubble of the mosque in what was a climax to an eight-month campaign to retake the city. But fighting is likely to continue for a while longer as Iraqi troops clear the remaining pockets of ISIS fighters, Army Col. Ryan Dillon, a spokesman for the US military campaign in Iraq and Syria, told reporters at the Pentagon.

The complete liberation of Mosul is "closer to days versus weeks" away, he said.

After that, a new war front will open, Dillon said. The Iraqi government will decide which ISIS-controlled Iraqi city to liberate next with the help of a barrage of coalition strikes — al Qaim, Tal Afar, or Hawijah, he said. In all, there are 150,000 Iraqi citizens still living under ISIS control in those cities, including 75,000 children, Wendy Taeuber, Iraq country director for the International Rescue Committee, said in a statement.

The cost to liberate Mosul — and other ISIS-controlled cities before it — has been high. Piles of rubble are all that remain of neighborhoods in the liberated cities of Fallujah and Ramadi, and Mosul’s west side bears deep scars from months of combat, Dillon said.

Only 191,000 residents have returned to the city’s eastern half since it was retaken by government troops in January — and it is far less damaged than the west. In all, 900,000 residents have fled Mosul, according to aid groups.

Moreover, Iraq’s counterterrorism force, which has fought ISIS in at least a half-dozen Iraqi cities, has had an attrition rate — dead and wounded — of roughly 40 percent during the Mosul campaign.

The West Point study noted that in Fallujah, which was liberated from ISIS a year ago, “the citizens of the city are still facing an array of challenges, from destroyed buildings to live Islamic State munitions buried in the rubble to the continuing threat of Islamic State attacks.” As of March, the mayor of Fallujah had yet to return to the city to live; instead, he visits periodically from his home in the Iraqi city of Irbil, the study said.

Ahmad Al-rubaye / AFP / Getty Images

Since the liberation two years ago of Ramadi, the capital of Anbar province, ISIS has struck there 163 times, according to the West Point report.

Aid groups already are warning that even in liberated parts of Mosul, residents face water and medicine shortages. The children of Mosul face particular hardships, according to UNICEF.

In western Mosul’s old city, “children are facing multiple threats to their lives. Those stranded in the fighting are hiding in their basements, fearful of the next onslaught. Those who try to flee, risk being shot or wounded. Hundreds of civilians have already been reported killed and used as human shields,” Peter Hawkins, UNICEF’s representative in Iraq, said in a statement. “Boys and girls who have managed to escape show signs of moderate malnutrition and carry psychosocial scars of the conflict, as a consequence of what they have been through.”

Dillon said the US military would not be involved in rebuilding Mosul. That would fall to the Iraqi government, with help from the State Department, USAID, and nongovernmental organizations.

“The liberation of cities in Iraq and Syria has proved to be much more of a mixed bag for those living in the aftermath,” the West Point study concluded.

Nancy Youssef is a national security correspondent with BuzzFeed News and is based in Washington, DC.