543145308
A billboard of the Islamic State group is seen in Fallujah, 50 kilometres (30 miles) from the Iraqi capital Baghdad, after Iraqi forces retook the embattled city from the jihadist group on June 26, 2016. Getty Images

The Iraqi Army and its allies continued to march closer Tuesday toward the Islamic State's stronghold of Mosul. As the militants, also known as ISIS and Daesh, prepare to be assaulted on all sides and likely ousted from their last major area of influence in Iraq, here's what you need to know about how the group went from being an Al Qaeda-style jihadist movement in Iraq to a household name with a self-proclaimed caliphate sprawled across two major countries in the Middle East.

How Did ISIS Start? ISIS as it exists today began in Iraq shortly after the 2003 U.S. invasion. The fall of Saddam Hussein was crucial to the group’s formation. Hussein was the Sunni, yet secular and authoritarian president of Iraq. The majority of Iraqis are Shia. Though tensions boiled under the surface of Iraqi society under Hussein, his iron fist policies often swiftly stifled open sectarian strife. When Hussein was toppled in 2003, the U.S.-supported interim government was quickly populated by Shiites, who for the first time in the country’s modern history could enjoy prevailing authority. Many Iraqi Sunnis felt threatened by the power shift.

At this time, a charismatic Jordanian ex-con named Abu Musab al-Zarqawi saw the chaos of post-Hussein Iraq as the perfect opportunity to form his new terror group, which he named Al Qaeda in Iraq. He had previously spent time in Afghanistan with the likes of Osama bin Laden before waging a brutal campaign of guerrilla attacks against U.S. and Iraqi forces. Even more harmful, however, was his intense hatred for Shiites, whom he targeted in order to incite sectarian violence in the already damaged society of war-torn Iraq. His methods were so brutal that he was continually admonished by Al Qaeda leadership. Zarqawi had the dream of establishing a modern-day caliphate and continued his bloody campaign until he was eventually cut down by a U.S. airstrike in 2006.

128637817
Iraqis celebrate the end of the Saddam Hussein regime as they watch US Marines topple a massive statue of the Iraqi dictator in downtown Baghdads Firdos Square on April 9,2003 Getty Images

Why Is The Islamic State In Syria And Iraq? After four years of decline, the organization’s successors, Abu Ayub al-Masri and Abu Umar al-Baghdadi, were also killed in a 2010 joint Iraqi-US raid. An ailing Islamic State of Iraq was then inherited by a man named Abu Bakr Baghdadi (no relation). Baghdadi took power just as U.S. coalition troops withdrew in December 2011. The withdrawal, as well as lingering sectarian and interethnic violence that existed in the country, gave the Islamic State the ammunition it needed to stage a violent resurgence aimed at crippling the government and its security apparatus. Regional chaos also played into the militants’ hands. As armed insurrection turned into civil war in neighboring Syria, Baghdadi expanded his reign. In 2013, Baghdadi changed the group’s name to Islamic State in Iraq and Syria (or Islamic State in Iraq and the Levant, depending on your translation).

ISIS began to expand its territory rapidly. The group’s goal of establishing a functioning Islamic State allowed it to focus on holding captured ground, rather than solely conducting guerrilla acts of terror like many other jihadist groups, including Al Qaeda. ISIS’ ability to manipulate social media was another important factor in its global reach, which allowed it to attract tens of thousands of followers from across the world. In 2013, the group captured the Syrian city of Raqqa, ISIS’ first provincial capital and now de facto capital of its self-proclaimed caliphate. In Iraq, the group made widespread gains in large cities such as Fallujah and Ramadi.

451738058
An image grab taken from a video released on July 5, 2014 by Al-Furqan Media shows alleged Islamic State of Iraq and the Levant (ISIL) leader Abu Bakr al-Baghdadi preaching during at a mosque in Mosul. Getty Images

Where Is ISIS' Caliphate? ISIS made headlines around the world when it raised its flag over Mosul in 2014. With a pre-war population of over 2 million and estimated 1.5 million remaining today, this was by far the militants’ biggest catch and the most devastating blow so far to the Iraqi government. Baghdadi declared a new caliphate that would reach from Aleppo, Syria, to Diyala, Iraq, and the group once again changed its name from ISIS to Islamic State, however, ISIS remains a popular term for the group worldwide.

ISIS has been accused of widespread human rights abuse within its territory in Iraq. The group has been particularly cruel to Shiites and Christians, whom the militants consider apostates. ISIS also routinely imprisons, tortures and executes many Sunnis whom the group accuses of not abiding by their strict interpretation of Islam and Sharia Law.

Is ISIS Losing? ISIS has suffered military defeat after military defeat in Iraq, causing the group to retreat to its northwestern stronghold of Mosul. On Oct. 17, the Iraqi Prime Minister Haider al-Abadi announced a long-awaited major offensive to recapture Mosul. The ongoing operation involves the Iraqi Army, Kurdish forces, Shiite militias and the support of a U.S.-led coalition. The militants have put up a fierce resistance, but many have already begun fleeing across the border to Syria, where it is expected that fighters will attempt to regroup in Raqqa in what may be the group’s last stand against the varied, yet rarely unified assembly of forces that oppose it.

468278066
A member of the Iraqi security forces flashes the sign for victory in front of a defaced Islamist flag in Tikrit on April 1, 2015, a day after the Iraqi Prime Minister Haider al-Abadi declared victory in the weeks-long battle to retake the northern Iraqi city from the Islamic State (IS) group. Getty Images