Updated

Iraq declared its war against the Islamic State was over after more than three years of combat operations drove extremist fighters from all of the territories 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 ISIS.

A senior military commander confirmed to The Associated Press that combat operations had been completed.

TRUMP, MATTIS TURN MILITARY LOOSE ON ISIS, LEAVING TERROR CALIPHATE IN TATTERS

"All Iraqi lands are liberated from terrorist Daesh (acronym of the group’s full Arabic name) 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.

The declaration comes two days after the Russian military announced it defeated the terror group in Syria, its ally, the BBC reported.

The jihadi group overran nearly a third of Iraqi territory, including Mosul, the country’s second-largest city, in the summer of 2014. ISIS leader Abu Bakr al-Baghdadi called it a new Islamic caliphate.

It was not immediately clear if the ISIS leader is still alive or dead. Reuters reported al-Baghdadi released a recording on Sept. 28 reporting he was alive.

TRUMP’S JERUSALEM DECISION COULD INCITE EXTREMISTS, IRAQ WARNS

ISIS started losing its land over the past three and a half years after Iraqi ground forces – backed by a U.S.-led coalition – fought to retake its territory. However, ISIS fighters remained 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 ISIS – 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.

Officials believed some ISIS fighters fled to Syria and Turkey.

Now the country would have to reconstruct the devastation done after years of fighting that left some 3 million Iraqis displaced.

The Associated Press contributed to this report.