BAGHDAD — Iraq said Saturday that its war on the Islamic State group is over after more than three years of combat operations drove the extremists from all of the territory they once held.

Prime Minister Haider al-Abadi announced Iraqi forces were in full control of the country’s border with Syria during remarks at a conference in Baghdad, and his spokesman said the development marked the end of the military fight against IS.

A senior military commander confirmed that combat operations had been completed.

“All Iraqi lands are liberated from terrorist Daesh gangs and our forces completely control the international Iraqi-Syrian border,” Lt. Gen. Abdul-Amir Rasheed Yar Allah said in a statement released shortly after al-Abadi’s remarks. Daesh is an Arabic acronym for IS.

The U.S.-led coalition congratulated Iraq on the “significant victory” Saturday, according to an official statement posted to Twitter. “We stand by the Iraqi people as they set the conditions for a secure and prosperous future,” it read.

IS fighters overran nearly a third of Iraqi territory, including Mosul, the country’s second largest city, in the summer of 2014.

Over the past three and a half years, Iraqi ground forces closely backed by the U.S.-led coalition have retaken all of that territory. However, IS fighters remain capable of carrying out insurgent attacks in Iraq, and the group has recovered from past setbacks.

In November, Iraqi forces retook the last town held by IS — Rawah, near the border with Syria. Over the following weeks Iraqi forces continued to clear patches of the country’s vast western deserts.

In the most significant victory over the extremists, Iraqi forces retook Mosul earlier this year. Al-Abadi declared the fight concluded in July, but clashes continued in the city for weeks afterward.

Iraq now faces the daunting challenge of reconstruction. The fighting caused massive devastation in many areas, and some 3 million Iraqis are still displaced.