A detailed timeline to the rise and near fall of the so-called Islamic State.
IS fighters pose for a photo in 2014 (Picture: Islamic State).
The so-called Islamic State (IS) is also known as ISIS, ISIL or Daesh.
The final towns and cities once held by the militant group were liberated last month, with confirmation coming from the US-backed Syrian Democratic Forces (SDF).
The UK's contribution to the fight against Daesh, Operation Shader, has been active for more than four years and will continue despite last month's significant milestone in the battle against the terror group.
The militants dislike being referred as 'Daesh' because it's similar to two Arabic words: 'Daes', which translates to 'one who crushes something underfoot', and 'Dahes', meaning 'one who sows discord'.
But now it is close to facing the defeat of its self-proclaimed caliphate.
Here is a timeline of how the events unfolded:
2004 - 2012
The group was formed from the remnants of al-Qaeda in Iraq, following the 2003 US-led invasion of the country by Abu Musab al Zarqawi.
In 2006, as al-Zarqawi dies in a US strike and Abu Ayyub al Masri replaces him.
He officially establishes the Islamic State in Iraq (ISI) and chooses Abu Bakr al-Baghdadi as the group leader.
For several years, they are fairly quiet and it is only as tensions in the Middle East start to grow that the group regains relevance.
In 2011, the group starts to reemerge and carry out attacks.
2013 - 2014
In 2013, the group officially breaks with al-Quaeda and is renamed by al-Baghdadi Islamic State in Iraq and the Levant (ISIL).
In June 2014, IS militants seize Falluja and Raqqa while also targeting Mosul and Tikrit.
Following said offensives and the capture of Mosul, they announce the formation of a caliphate from Syria to Iraq, and rename the group the Islamic State of Iraq and Syria (ISIS).