The Iraqi military has "fully liberated" all of Iraq's territory of "ISIS terrorist gangs" and retaken full control of the Iraqi-Syrian border, it said Saturday in a statement.
"Our heroic armed forces have now secured the entire length of the Iraq-Syria border," Iraqi Prime Minister Haider Al-Abadi said on his Twitter account. "We defeated Daesh (ISIS) through our unity and sacrifice for the nation. Long live Iraq and its people."
ISIS, an acronym for Islamic State in Iraq and Syria, rapidly captured large territories in Iraq and Syria and declared a caliphate in 2014. The group controlled more than 34,000 square miles of territory from the Mediterranean coast to south of Baghdad.
The campaign to eradicate the Islamic State took more than three years and about 25,000 coalition airstrikes. Iraqi forces have increasingly been pushing ISIS out of the country over the past few months. Iraqi forces last month retook the town of Rawa, one of ISIS's last footholds in the country. At that point, only pockets of ISIS resistance remained.
Al-Abadi later in a televised speech lauded the victory.
"Dear Iraqis, your land has been completely liberated, and your towns and villages have been returned to the homeland," he said. "The dream of liberation became a reality."
"ISIS dream has come to an end," he added. "We must remove all its effects and should not allow terrorism to return again."
ISIS remains a threat
ISIS' rise and the world's military response has created a devastating crisis for civilians and led to the displacement of more than 3.2 million people, according to the United Nations.
"Our people have paid a high price for its security and stability and the blood of its finest youth, men and women," Al-Abadi said. "Millions of families have suffered the hardships of displacement."
The underlying conditions that allowed for the rise of ISIS, such as sectarian and ethnic divisions and a lack of economic opportunities, remain potent issues in the region. ISIS began as an insurgency group and could return to its roots, and jihadi groups like al Qaeda could grow.
In addition, although ISIS no longer controls territory in Iraq, the threat of violence from members of the group is not over. As it has lost territory over the past year or so, ISIS has morphed into more of an ideological threat, both in the region and in the West.
"Despite the announcement of the final victory, we must remain vigilant and ready to face any terrorist attempt targeting our people and our country," Al-Abadi said. "Terrorism is a permanent enemy and the battle with it continues, and we must preserve this unity, which with it we have defeated ISIS."
US salutes 'historic gains'
The US Special Presidential Envoy for the Global Coalition to Counter ISIS, tweeted his support for Abadi's declaration and said the coalition would remain to assist the Iraqis.
"We congratulate the Prime Minister and all the Iraqi people on this significant achievement, which many thought impossible," Brett McGurk wrote.
"We honor the sacrifices of the Iraqi people, its security forces, and the Kurdish Peshmerga, and admire the unity in their ranks that had made this day possible," McGurk added. "That spirit must be renewed and continue as Iraq works to consolidate these historic gains over the coming year.
"Our @coalition will continue to stand with #Iraq to support its security forces, economy, and stabilization to help ensure that #ISIS can never again threaten Iraq's people or use its territory as a haven," he wrote. "We mark today's historic victory mindful of the work that remains."
™ & © 2017 Cable News Network, Inc., a Time Warner Company. All rights reserved.