The U.S.-Israeli war against Iran has triggered one of the Middle East’s long-feared nightmares: a full-blown regional conflagration. The expansion of the conflict has had especially significant consequences for Iran’s western neighbor, Iraq. For the past few years, Iraq had avoided getting entangled in the convulsions that followed Hamas’s attacks on October 7, 2023. Despite its strong ties to Tehran, Baghdad managed to stay largely outside the line of fire, mostly because both the Iranian and Iraqi governments discouraged Iranian-aligned militias in Iraq from joining the fight. These armed groups had emerged as a major force in the country after the toppling of the Iraqi dictator Saddam Hussein in 2003 and then again a decade ago, during campaigns against the Islamic State (also known as ISIS). After the October 7 attacks in Israel, neither Baghdad nor Tehran wanted to jeopardize Iraq’s relative stability and the economic and security benefits that came with it.…