Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — The Iraqi government has declared victory over ISIS, and President Donald Trump has taken credit for the Islamic caliphate's collapse.

"ISIS is now giving up, they are giving up, there are raising their hands, they are walking off. Nobody has ever seen that before," said the president during an October interview on WMAL's "The Chris Plante Show."

But experts both in and outside the U.S. government warn that ISIS remains a lethal force, as shown by a double suicide bombing in Baghdad Monday that killed 100. As the caliphate has collapsed the number of active fighters in Syria and Iraq may have dropped below 3,000, there are many more ISIS loyalists still on the scene.

Syrian fighters celebrate victory over ISIS in Raqqa on Oct. 17. Erik De Castro / Reuters

Hassan Hassan, coauthor of the book "ISIS: Inside the Army of Terror," estimates that some 7,000 ISIS-loyalists remain.

"They operate as a terrorist and insurgent organization almost purely now, versus as a conventional fighting unit," said Hassan, a senior fellow at the Tahrir Institute for Middle East Policy. "There are still so many in Syria, in the Abu Kamal and Deir al-Zour areas. A lot of them are Iraqis who fled across the border."

Hisham al-Hashimi, an adviser to the Iraqi government in its battle against ISIS, told NBC News that while the number of active fighters on the battlefield is probably in the range of 1,000 to 1,500, the actual number of ISIS-loyalists in Iraq and Syria is closer to 10,000.

Hassan Hassan, co-author of the book "ISIS: Inside the Army of Terror." Tahrir Institute for Middle East Policy

At its peak, according to U.S. officials, ISIS had 45,000 fighters active in the area where the U.S. led coalition is operating.

Since airstrikes in Iraq and Syria began in 2014 under the Obama administration, a territory that was once the size of Ohio has been almost entirely recaptured by coalition-backed forces.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The terror group's two biggest strongholds, Mosul in Iraq and its de facto capital of Raqqa in Syria fell in July and October respectively to coalition-backed forces.

Trump has given significant leeway to the Department of Defense to carry out its mission and help local ground forces liberate the remaining territory.

Trump pointed to his leadership as one of the key factors driving ISIS fighters off the battlefield.

"I totally changed rules of engagement. I totally changed our military, I totally changed the attitudes of the military and they have done a fantastic job," Trump said in his interview with Chris Plante.

"ISIS: Inside the Army of Terror" Regan Arts

ISIS has not only lost territory, but it is being denied access to revenue sources such as oil and gas and cash reserves that once amounted to more than $1 billion in 2014. ISIS had also generated some $30 million per month in Iraq from taxation and extortion in 2015, according to Iraqi and U.S. government estimates.

Trump has vowed to end the "current [U.S.] strategy of nation-building and regime change" because he says it doesn't work. In outlining the pillars of his Afghanistan strategy last summer, Trump said the U.S. is not about nation building, but rather, "killing terrorists."

But recent history has taught the U.S. some harsh lessons about withdrawing from conflicts too soon. Former President George W. Bush struck an agreement with the Iraqi government that called for a withdrawal of U.S. troops by December 2011.

Obama stuck to that schedule, believing that the Iraqis needed to stand on their own while the U.S. turned its attention to the domestic economy and other pressing needs at home and abroad — what he called "nation-building at home." But the rise of the Islamic State group, an offshoot of the dormant al-Qaeda in Iraq, forced American forces back to Iraq and Syria, first in the form of airstrikes and later, an advise and assist mission and the use of special forces.

"There is a big difference between defeating them militarily on the battlefield and eliminating ISIS as a terrorist organization," said Daniel Glasser, the Treasury Department's assistant secretary for terrorist financing under former President Barack Obama.

A member of Iraqi security forces holds an ISIS flag in the Old City of Mosul on July 10. Thaier Al-Sudani / Reuters

Defense Secretary Jim Mattis said in December that U.S.-backed forces were in the process of "crushing the life" out of ISIS.

"We told you that the [ISIS] caliphate was going to go down," Mattis added, and "as we sit here today at the end of 2017, the caliphate is on the run, we're breaking them."

But he also said the "war is not over." Mattis emphasized that much work remained to prevent the emergence of what the retired four-star general called "ISIS 2.0," noting that the group may attempt to return to its modest, low-budget terror roots in an effort to once again exploit sectarian rifts in Iraq and Syria.

On Friday, the Pentagon released a National Defense Strategy that said terrorism remained "a persistent condition ... despite the defeat of ISIS's physical caliphate."

A day earlier, Secretary of State Rex Tillerson, laying out the Trump administration's broad strategy for Syria, said a quick withdrawal from Syria would give the jihadist group an opportunity to make a comeback.

"The United States will maintain a military presence in Syria focused on ensuring Isil cannot re-emerge," he said, using an alternate acronym for the group. "We cannot make the same mistakes that were made in 2011 when a premature departure from Iraq allowed al-Qaeda in Iraq to survive and eventually morph into Isil."

This week's suicide bombing in one of Baghdad's busiest public squares rattled the city's growing sense of security. And while ISIS is no longer earning millions from oil and extortion, it has reverted to raising funds from charities and wealthy donors.

U.S. estimates of the terror group's remaining strength, meanwhile, are similar to those offered by outside experts. Like Hassan and al-Hashimi's figures, recent U.S. public estimates of active ISIS fighters have ranged from 3,000 to 1,000, with the number falling rapidly.

On background, U.S. officials say they estimate ISIS non-battlefield strength in Iraq and Syria at 6,000 to 8,000, in line with Hassan's figure but lower than al-Hashimi's of 10,000, which includes potential lone-wolf attackers.

ISIS is "transforming into a new threat," said Glasser, who is now a principal at the Financial Integrity Network. "They don't have this safe haven and it makes it harder for them to plan catastrophic attacks on us, but at the same time the threat is very much still there, and more diffuse and a little bit less predictable."