Although Iraq has taken its land back from Islamic State troops, the country's troubles are far from over, an international affairs expert says.
Iraq's prime minister, Haider al-Abadi, announced today they had won the war against IS after taking complete control of the last few areas they held.
Professor Alexander Gillespie said the country now faced the challenge of rebuilding itself.
"Beating the enemy's one thing, peace building is another and so you need to transition the forces that are there and the civil infrastructure into building a new community which is inclusive, which tries to confront corruption and which [ensures] there's employment for the people. Without those things you will find that Iraq as a country will not hold together.
"It's a long-term challenge, it's going to take decades to rebuild the country into anything like the kind of prosperity that it once had."
Two days ago the Russian military declared it had accomplished its mission of defeating IS in neighbouring Syria.
The jihadist movement seized large swathes of Syria and Iraq in 2014, and imposed its rule on 10 million people.
But it has suffered a series of defeats recently, and last month lost its de facto capital of Raqqa in northern Syria.
Mr Gillespie cautioned against thinking this was the end of the extremist group.
"You need to be thinking longer term because there will be another Islamic State, it's just a question of when, just like there was an Al Qaeda and there will be other jihadi groups. In the longer term it's about building societies where these groups do not ferment and come forward."
He said many people involved with IS would have now fled Iraq and would be looking to enter other countries.
"This is the major European preoccupation right now, most of Europe's not that concerned with what happens to Iraq but what happens when these people come back into your community and they've been involved in war crimes and crimes against humanity and they want to continue the fight."
He said vigilance in dealing with these people was paramount to a country's safety.
"The general feeling is that you've got to lock them up when they come home, you've got to make sure that there's a deterrent so that they know they're not scot-free and then you've got to investigate every one of them to see how engaged they were in the conflict."
Mr Gillespie said it was also likely New Zealand residents involved with IS may want to come home.
"In New Zealand there's uncertainty about how many people went, but we know that not everyone would have been killed and that a lot of them will be trying to come home, and if they do come home then it's about trying to make sure we catch them at the border, that they're incarcerated and that they atone for the crimes that they've done."