The U.S. military has completed its withdrawal from Iraq, bringing an end to a 12-year deployment that began with the fight against ISIS and evolved into a mission aimed at preventing the terrorist group from rebuilding.

The final American troops departed bases in Erbil in northern Iraq on Wednesday. The withdrawal was set in motion under an agreement reached by the Biden administration in 2024 and completed under the Trump administration.

The departure comes 23 years after the U.S.-led invasion that toppled Iraqi dictator Saddam Hussein and dramatically reshaped the country and the broader Middle East.

“This milestone reflects the success of a 12-year campaign that defeated ISIS as an organized military threat in Iraq and across the region,” Chief Pentagon Spokesman Sean Parnell said in a statement. “It also marks a transition from a wartime coalition mission to an Iraqi-led security effort supported by a more normal bilateral security relationship.”

U.S. troops have left Iraq before

This is not the first time the United States has brought its military mission in Iraq to an end.

American troops withdrew in 2011, eight years after the invasion that ultimately led to Hussein’s capture. But the U.S. military returned three years later as ISIS seized large areas of northern Iraq and neighboring Syria.

At the Iraqi government’s request, the United States deployed roughly 5,000 troops in 2014 to help Iraqi forces battle the rapidly expanding terrorist group.

ISIS lost the last of its territorial strongholds in 2019, but American troops remained in Iraq to train and support local forces and help prevent the organization from making a comeback. About 2,500 U.S. troops remained in the country in the years that followed.

The latest withdrawal follows the departure of U.S. forces from eastern Syria earlier this year.

Iraqi Prime Minister Ali al-Zaidi described the withdrawal as the beginning of “a new phase, one defined by Iraq’s sovereignty, the strength of its institutions, the readiness of its forces, the unity of its decision-making, and balanced partnerships with its friends,” according to CNN.

Withdrawal comes amid new regional tensions

The timing of the American departure is drawing additional scrutiny because the security situation in the Middle East has changed considerably since the withdrawal agreement was reached.

Tensions involving Iran and its regional allies have intensified, while U.S. troops stationed in Iraq have previously faced attacks from Iran-backed militias amid fighting involving Israel and Iran-aligned groups elsewhere in the region.

“The Iran-backed groups viewed the US presence [as] an extension of the occupation of Iraq,” Lahib Higel, deputy program director for the Middle East and North Africa at International Crisis Group, told CNN.

“These groups believe that the US were in Iraq to monitor the activities of the Iran-allied militias,” Higel added.

As’hab Al-Kahf, an Iran-backed militia, celebrated the American departure, congratulating Iraqis “on the humiliating withdrawal of the American occupier under the strikes of the Resistance’s drones and missiles,” according to CNN.

The withdrawal now places considerably more responsibility on Iraqi security forces, which have received years of American training and assistance.

Questions remain over whether those forces can contain Iran-backed militias and prevent ISIS remnants from rebuilding their strength without American troops stationed inside the country.

The Pentagon says the end of the military deployment does not mean the end of U.S. security cooperation with Iraq.

“We expect the Iraqi Security Forces, including the Peshmerga and other security forces in the Iraqi Kurdistan Region, to lead the continuing effort to secure Iraq and keep ISIS remnants suppressed,” the Defense Department said. “The Department of War will continue to provide targeted training and intelligence support to our Iraqi partners.”

The withdrawal closes another chapter in the long and complicated U.S. military presence in Iraq. But with ISIS remnants still active and Iran continuing to wield influence through allied groups in the region, the security challenges that kept American forces there for more than a decade have not disappeared with their departure.