“I think in his death he put the final nail in the coffin of the U.S. military presence in Iraq,” said Mohammad Shabani, a doctoral researcher at the School of Oriental and African Studies in London who focuses on Iran-Iraq relations. “If Iran can erase the U.S. military presence in Iraq and all it has to do is give up five Iranian military men, would Iran do it? I think the answer is yes.”

The United States has nearly 5,000 troops in Iraq on a handful of bases.

But whether they stay or go, the American power in Iraq was only likely to be diminished.

“One sure result of the U.S. strike is that the era of U.S.-Iraq cooperation is over,” Richard N. Haass, the president of the Council on Foreign Relations and a former American diplomat, wrote on Twitter. “The U.S. diplomatic & mil presence will end b/c Iraq asks us to depart or our presence is just a target or both. The result will be greater Iranian influence, terrorism and Iraqi infighting.”

More than 16 years after the American invasion of Iraq, a devastating conflict that cost close to $1 trillion and claimed about 5,000 American lives, Iran is the dominant power in Iraq, and its grip on Baghdad was on vivid display this week, even before General Suleimani’s killing.