Iraq has declared victory over ISIL militants.
Three years after the group calling itself Islamic State overran about a third of Iraqi territory, the government says the last of ISIL fighters have been driven from the country.
Haider al-Abadi, the Iraqi Prime Minister, said in a televised address: "Honourable Iraqis: your land has been completely liberated.
"The dream of liberation is now a reality. We have accomplished a very difficult mission.
"Our heroes have reached the final strongholds of Daesh and purified it. The Iraqi flag flies high today over all Iraqi lands."
Abadi later told a media conference: "These victories are not only for the Iraqi people, though they themselves achieved victories with their sacrifices.
"But the victories are for all Arabs, Muslims and the world alike."
The announcement came after the military said the last areas under ISIL's control along the border with Syria had fallen into government hands.
Two days ago the Russian army declared the defeat of ISIL fighters in Syria, where Moscow has been supporting government forces.
Iraq is reported to be planning a victory parade in the coming days.
Abadi declared December the 10th a national holiday, which will be celebrated every year.
The American-led coalition that has been supporting the Iraqi forces against ISIL welcomed the news in a tweet.
"The Coalition congratulate the people of Iraq on their significant victory against #Daesh. We stand by them as they set the conditions for a secure and prosperous #futureiraq," it Tweeted.
Mosul, ISIL's de facto capital in Iraq, was freed from militants in July.
ISIL's Syrian capital, Raqqa, also fell to a U.S.-backed Kurdish-led coalition in September.
But Abadi warned: "Daesh's dream is over and we must erase all its effect and not allow terrorism to return.
"Despite announcing final victory, we must remain vigilant and prepared against any terrorist attempt on our country, for terrorism is an eternal enemy."
The United Nations estimates that some 3.2 million people remain displaced from areas that were under ISIL's control.