In June 2017, the Iraqi Prime Minister, Haider al-Abadi, was able to declare the defeat of Daesh (also known as ISIS).
With just 6,000 militants left in the war-torn country, the terror group were forced to flee.
However, they have left behind their families, wives and children, many of them having to pay the price for their actions.
Iraq fell into Daesh hands in June 2014, when the leader of the terror group Abu Bakr al-Baghdadi, declared a caliphate in Mosul, the country's second city.
Daesh quickly expanded its territory in Iraq and Syria throughout that year, however slowly but surely, they have been pushed back.
Around 30,000 troops drawn from the Iraqi Armed Forces, Kurdish Peshmerga fighters and Shia militias began their plan to take back Mosul in October 2016.
Supported by US-led coalition airstrikes, they were able to gain ground, and Mosul was liberated, even though fighting in certain areas continues.
Questions however are starting to emerge as to what to do with the militants families, many of whom have said they felt lost and alone, and are living in encampments in the eastern part of Mosul.
"All the men were killed," 62-year-old Umm Hamoudi, who fled the Midan district in the Old City with 21 members of her family — all women and children — said in a recent interview.
Hamoudi's husband was a member of Daesh, he was left to die on the battlefield.
Some Iraqis believe that these remaining family members have terror links and many are concerned whether the country will ever be able to rid itself of its connection to Daesh.
Lecturer in international relations at Lancaster University, Dr. Simon Mabon, believes that this is a crucial time for Iraq and that problems can arise in the short-term. Dr. Mabon believes that a distinction needs to be made between the different types of people involved in fighting for Daesh.
Many of the militants' families got involved with Daesh because there were afraid of what could happen to them.
Dr. Mabon also highlights the people who were formally members of al-Qaeda, as well as people who shared this vision that Abu Bakr al-Baghdadi had, which was for Daesh to bring about the end of days.
Dr. Mabon believes once you understand these various factions you can finally eliminate terror links from the country.
"There were people who were just caught up in the region, and turning to the group for support and protection.
That's where it gets really difficult, as you can see that certain people have started to support the group just because they are afraid of what's going on, they are afraid of other groups and other actors inside Iraq, so in essence they were getting protection from Daesh," Dr. Mabon said.
"We have to say okay, well if there is this problem, if people are having to turn elsewhere to meet their basic needs and to ensure that they are protected and their families are protected, then something can be done, and if something can be done, you can start to defeat the group and prevent terror from appearing in the long term," he added.
Despite knowing that many of the families who are connected to the militants, joined and married the men out of fear, other Iraqis still do not trust them, believing that they could continue the work of the terror group.
Dr. Mabon believes that the biggest challenge is to ensure these people are rehabilitated, and the government must introduce transitional justice, so that Iraq can maintain peace.
"People have been pushed to the margins of society, and people have been forced to turn elsewhere to meet their basic needs.
So if you have got people that have been struggling to meet their basic needs, and have had to turn to groups like Daesh, then of course that fear and hatred would have spread.
So what has to happen is you have to get people more included in society, you have to rehabilitate — sure they have to go through due process, they have to pay the price for any crimes that have been committed, they have to serve their time — but after that, they must be fully rehabilitated, otherwise you can get these deep seated grievances that are just perpetuated, and then a cycle of violence just starts to spiral out of control.
"I think transitional justice is key, but then full on rehabilitation and reintegration is essential to make sure that Iraq becomes a peaceful place, and you can start to rebuild a nation state," Dr. Mabon told Sputnik.
For Iraq to maintain peace, Dr. Mabon states that holding those people to account who committed crimes is of the utmost importance.
The continued civil war in Iraq over the last 15 years has meant that many victims have not been heard, and Dr. Mabon believes this has to change.
But the rule of law must be upheld and the correct judicial process in place to ensure punishments are given to those who perpetrated violence.