The Iraqi insurgency occurred from 9 December 2017 when the Islamic State, having lost its territorial control to the Iraqi government in the Iraqi Civil War, transitioned into an insurgency with the help of the White Flags and the Iraqi Ba'ath Party. ISIL's 17,000 remaining fighters teamed up with the White Flags' 1,000 fighters and the 80,000 Ba'athist JRTN insurgents to wage war against the 168,000-strong Iraqi Army, the 150,000-strong Iran-backed Shia Popular Mobilization Forces militia, and the 5,000 US and 550 British troops left in the country to assist the Iraqi government.
War[]
On 9 December 2017, Prime Minister of Iraq Haider al-Abadi proclaimed victory over the Islamic State caliphate after the Iraqi Army, allied Shia paramilitaries, and the Kurdish Peshmerga forces captured IS' last territories in the desert of Anbar Governorate. While Iraqis celebrated the delcaration of victory in the Green Zone of Baghdad on 10 December 2019, the Islamic State's remaining 17,100 fighters in Iraq prepared to transition into an insurgency phase, operating from their desert and rural bases. ISIL came to have a strong presence in Kirkuk, Diyala, Saladin, and Sulaymaniyah governorates, and they also came to have a strong presence in Kirkuk, Hawija, and Tuz Khurmatu. IS fighters moved through local villages and forced locals to provide them with food and intelligence, also entering into mosques and asking for funds to continue the insurgency. By the fall of 2018, ISIL was stronger than it was in 2008 as the "al-Qaeda in Iraq", having a combined 30,000 fighters in Iraq and Syria. While ISIL's fighters were scattered and without territorial control, they were still in a position to make a comeback, as they faced only local defense forces in the villages of northern Iraq and still had considerable numbers.
IS carried out a number of terrorist attacks against the Iraqi government throughout 2018 and 2019, but IS' strength was underestimated; Canada suspended its military aid to the Kurdish Peshmerga after judging them as no longer useful in the fight against IS. On 4 August 2018, Iraqi Ba'ath Party leader Izzat Ibrahim al-Douri issued an online statement calling of Iraqis to continue fighting the government and the Iranian-backed "Safavid" militias; he also praised Saudi Arabia and called on them to fight against Iran's influence in the country.
On 4 October 2018, the Iraqi military and the Coalition nations of France and the United States initiated an operation to sweep through Anbar Governorate near the city of al-Qa'im and the Syrian border, where IS continued to remain strong and have a large presence. While the fighting in Anbar continued, IS fighters in Kirkuk planted IEDs and carried out ambushes and raids on Iraqi outposts, and the group executed alleged government collaborators. Turkey pledged $5 billion in military aid for the Iraqi government, while US soldiers began training in anti-drone warfare, fearing that the IS fighters would employ drones in their attacks. On 10 September 2019, the US bombed an IS staging area and transit and operations hub on Qanus Island on the Tigris River south of Mosul, dropping over 80,000 pounds of laser-guided bombs and heavily cratering the island. In January 2020, following the escalation of US-Iran tensions amid the Persian Gulf crisis, the Iraqi Council of Representatives voted in favor of a resolution mandating the withdrawal of US troops from the country. On 20 March 2020, despite initially refusing to order a withdrawal, Donald Trump finally began to withdraw US troops from Iraq. My mid-2020, the Iraqi security forces were forced to be redeployed to enforce curfews and lockdowns due to the COVID-19 pandemic, leading to an intensification of the ISIL insurgency.
On 21 January 2021, in the first major suicide bombings in Iraq since January 2018, over 32 people were killed and over 110 wounded in ISIL bombings in Baghdad. A week later, on 27 January 2021, the deputy caliph of ISIL, Abu Yasser al-Issawi, was killed in a counter-terrorism operation near Kirkuk along with two other leaders and 4 fighters; his death was announced a day later. Throughout 2021, President Joe Biden oversaw the gradual withdrawal of US forces from Iraq to end America's "forever war" in Iraq. On 18 February 2021, NATO announced its intent to expand its mission to train Iraqi security forces and increase the number of NATO advisors in Iraq from 500 to 4,000. On 22 April 2021, CENTCOM commander Frank McKenzie announced that the United States would stay in Iraq to finish the fight against ISIL rather than totally withdraw from the country; he also cited the continued threat that Iranian-backed militias posed to the coalition.