Iraq's prime minister declared victory Saturday over Islamic State, the extremist group that imposed its brutal reign on millions, saying government forces have driven the militants from their last footholds in the country after three years of grueling combat.
In a televised address to the nation, Prime Minister Haider Abadi said Iraqi troops were now in full control of the western desert regions along the border with Syria, where the militants made their final stand.
"The dream of liberation is now a reality," Abadi said, as senior members of the country's armed forces stood at attention behind him. "The Iraqi flag is flying high today over all Iraqi lands and at the farthest point on the border."
The U.S.-led coalition, which provided vital air support and other military aid to Abadi's government, congratulated the Iraqis in a tweet Saturday on a "significant victory."
But Islamic State adherents have recovered from previous setbacks, and commanders warn they remain capable of inflicting deadly attacks, both in Iraq and around the world.
With the collapse of the group's self-styled caliphate, Iraqi officials and their international allies acknowledge it probably will revert to its roots as a guerrilla force and continue to inspire recruits to kill in its name.
"The United States joins the government of Iraq in stressing that Iraq's liberation does not mean the fight against terrorism, and even against ISIS, in Iraq is over," State Department spokeswoman Heather Nauert said in a statement, using a common acronym for the militants also known derisively in Arabic as Daesh. "Together, we must be vigilant in countering all extremist ideologies to prevent the return of ISIS or the emergence of threats by other terrorist groups."
Brett McGurk, the U.S. envoy to the anti-Islamic State coalition, said it would continue to support the country's security forces, economy and stabilization to help ensure the militants "can never again threaten Iraq's people or use its territory as a haven."
"We mark today's historic victory mindful of the work that remains," McGurk said in a tweet.
Abadi has said he expects that the U.S. will draw down its forces, which peaked at about 5,200 this year, after the end of combat operations against Islamic State, but would like some troops to remain to provide training, intelligence and logistical support.
Iraq's victory comes at enormous cost to its people. The coalition acknowledges that its forces have killed at least 800 civilians in Iraq and Syria since it launched its campaign against Islamic State in 2014. Monitoring groups put the toll much higher, at least 5,961, according to the London-based group Airwars.
The fighting has ravaged major cities, and more than 3 million Iraqis remain displaced.
Saturday's announcement came two days after the Russian military said it had accomplished its mission of helping President Bashar Assad defeat Islamic State in neighboring Syria, although the group retains a presence there and fighting continues in pockets near the Iraqi border.
Islamic State stunned the world when its black-clad fighters stormed out of Syria at the end of 2013 and swiftly took control of a large swath of Iraq, including its second-largest city, Mosul.
At the height of the group's strength, it controlled about a third of both countries and imposed its harsh interpretation of Islam on more than 8 million people. But the militants have been losing territory.
Iraqi forces, backed by U.S. air power and militias supported by Iran, recaptured Mosul in July after a nine-month campaign. Raqqah, the group's de facto capital in Syria, fell to a U.S.-backed alliance of Kurdish and Arab militias in October.
Since then, fighting has been concentrated in a string of cities and towns along the Euphrates River and desert areas straddling the porous border between Syria and Iraq.
The whereabouts of the militants' reclusive leader, Abu Bakr Baghdadi, remains unknown. In September, Islamic State released a purported audio recording of Baghdadi in which he urged followers around the world to intensify attacks.
"Now the Americans, the Russians and the Europeans are living in terror in their countries, fearing the strikes of the mujahideen," he said.
Islamic State retains active branches elsewhere in the Middle East, Africa and Asia — a potent threat underscored by an assault last month on a Sufi mosque in Egypt's restive North Sinai region that killed more than 300 people.
Counter-terrorism experts also warn that groups don't need to control territory to inspire so-called lone-wolf attacks, a strategy Islamic State has used with deadly effect in cities such as Orlando, Fla., and San Bernardino.
"Victories over terrorists have been precipitously declared countless numbers of times before only to have proven illusory," said Bruce Hoffman, director of the Center for Security Studies at Georgetown University in Washington. "Groups like ISIS always leave behind a subversive cadre that has the capability, the motivation and the intention of becoming the nucleus of either the group's next iteration or even its rebirth."
Islamic State is an offshoot of an Al Qaeda affiliate in Iraq that many U.S. commanders believed had been defeated nearly a decade ago. Even as Iraq's Shiite-led government celebrates its latest victory, deep-seated grievances among minority Sunni Arabs who dominated under the late strongman Saddam Hussein remain unaddressed.
"Fear of Iran, fear of Shia domination, fear now of becoming victims themselves has produced a witch's brew that certainly surviving elements of ISIS could take advantage of and exploit, or that a successor could build upon," Hoffman said.
Abadi acknowledged as much in his address Saturday, when he called on Iraq's politicians to refrain from "inciting and sectarian speech," which he said was a "primary cause in the humanitarian tragedies and in empowering the gang of Daesh."
Some of the Iraqi forces that were among the most effective against Islamic State have now been drawn into a standoff between Abadi's government and leaders of Iraq's semiautonomous Kurdish region over a vote for independence.
Still, analysts said Saturday's victory declaration represents a remarkable achievement for the Iraqi security forces, many of whom laid down their weapons and fled Islamic State's advance three years ago.
"The declaration of the war's end will give Abadi the momentum he needs to tackle some of the other issues facing the country," said Sajad Jiyad, managing director at Baghdad's Al Bayan Center for Planning and Studies.
"There is an unprecedented amount of optimism," he said. "But attention will also turn quickly to the need for rebuilding, providing jobs and fighting corruption, which are the priorities for most Iraqis."
Bulos is a special correspondent.
5 p.m.: This article was updated with analyst comment and additional background.
2:05 p.m.: This article was updated with the Iraqi prime minister addressing the nation and reaction from the State Department and the U.S. envoy to the anti-Islamic State coalition.
8:50 a.m.: This article was updated with staff reporting, including quotes from Iraqi Prime Minister Haider Abadi and background.