The US military completed its full withdrawal from Iraq on Wednesday, ending a 12-year mission to fight the Islamic State group and closing a chapter of American military presence that began with the 2003 invasion.

The pullout, agreed upon two years ago, leaves no American troops on Iraqi soil for the first time in more than two decades. It comes as the US remains locked in a broader war with Iran that has repeatedly spilled into Iraqi territory.

Iran-backed militias celebrated the departure as a victory against American forces. "The expulsion of the occupation forces, defeated, from the land of Iraq is the beginning of full sovereignty," said Abu Mujahid al-Assaf, a security official with Kataib Hezbollah, one of the most powerful Iran-aligned armed groups in Iraq.

The withdrawal unfolded in stages. US troops left bases across most of Iraq last year but kept several hundred personnel in the semiautonomous northern Kurdish region. Those bases had come under regular rocket and drone attacks since the US and Israel launched their war against Iran on Feb. 28.

Iran-backed Iraqi militias also coordinated with Yemen's Houthi rebels to strike targets in Saudi Arabia during the same period, widening the regional conflict.

The American exit was welcomed by Shiite political factions aligned with Tehran, who have long demanded an end to the US military footprint. But it has raised alarm among Kurdish leaders in the north, who relied on American forces as a buffer against both Iranian influence and ISIS remnants.

Kurdish officials have not issued a formal statement on the completion of the withdrawal, but regional leaders have privately warned that the loss of US air cover and intelligence support could leave their territory exposed.

The US military did not release details on the final convoy movements or the total number of personnel involved in the last phase of the drawdown. The Pentagon has not said whether any forces will remain in the region on standby.

The withdrawal marks the end of a mission that began in 2014, when ISIS seized vast swaths of Iraq and Syria. At its peak, the US had thousands of troops in Iraq supporting local forces with airstrikes, training, and intelligence. The campaign officially ended ISIS's territorial caliphate in 2019, but US forces stayed on in what officials described as an advisory and counterterrorism role.

Iraq now faces the challenge of securing its borders and preventing an ISIS resurgence without direct American military support, while navigating pressure from both Washington and Tehran.