Last week, rockets landed in what was once known as the Green Zone—the heavily fortified neighborhood in western Baghdad where the American embassy is located. It was the second such attack since May, when another rocket exploded near the massive U.S. compound. Then as now, the Trump administration thinks the attacks were the work of Shiite militias in Iraq with close ties to Iran. Washington has long called on the Iraqi government to clamp down on these Iranian proxy forces and cut off relations with Tehran. The U.S. response to the latest attack will likely be to double down on those calls and dial up the pressure on Baghdad.

That approach is unwise. The current government in Baghdad is on good terms with Washington but cannot survive if it makes an enemy of Tehran. The last thing it wants is to get caught in the crossfire between the two. At best, the United States’ attempts to cut Iran out of the picture will not succeed. At worst, Washington could weaken a friendly government in Baghdad and pave the way for one that is far less disposed to cooperation.

The current government in Baghdad is on good terms with Washington but cannot survive if it makes an enemy of Tehran.

Not so long ago, Iran’s proxies in Iraq had become the United States’ partners in the fight against the Islamic State, or ISIS. U.S. aircraft and Special Forces coordinated indirectly with the militia fighters, with the Iraqi army serving as the conduit. Because of this, the Americans were prepared to look the other way while these same forces also supported Iran’s agenda in Syria and Yemen, against U.S. interests in these countries. But with ISIS in Iraq largely contained, that indirect cooperation has ended, and the Iran-linked militias want the remaining U.S. forces to leave the country.

Today, several dozen such Shiite militias operate in Iraq (in addition to a handful of Sunni ones). They receive substantial budgetary support from the central government but are not entirely under its control. Many operate smuggling rings and rackets and snarl traffic with their checkpoints. Even without the rocket attacks, their continued influence is bad news.

And yet when we traveled to Iraq earlier this month, our interlocutors—experts and officials, many of whom we have known for years—were sober about the prospects of bringing the militias to heel soon. Prime Minister Adel Abdul-Mahdi, in office since October 2018, depends on Shiite political parties and the political wings of the militias to maintain his parliamentary majority. He has limited leverage against them as a result. He has ordered the militias to relinquish their corrupt business dealings, to no avail. What’s more, we were told repeatedly that no Iraqi political figure is immune to Iranian blandishments and threats.

Fighters from the Iran-linked Popular Mobilisation Forces near the Iraqi-Syrian border, November 2018 Alaa Al-Marjani / Reuters

Leaders in Iraq do not appreciate what they perceive as American lectures about the dangers of pro-Iranian “ministates” within Iraq—particularly given how often the U.S. narrative changes. One senior cabinet minister complained that the Americans flip-flopped constantly, coordinating with Iran-linked militia leaders against ISIS one year, deciding that the militias were a deadly threat the next. Another U.S.-friendly top official agreed, saying that the Iraqi government, with its wobbly parliamentary coalition, could not reasonably be expected to follow the United States’ sudden changes of course.

Now that the United States and Iran appear to be poised on the precipice of conflict, Iraqi leaders have particular reason to fear being whipsawed. In mid-September, a drone strike on Saudi Arabia’s Aramco oil facilities raised tensions along with worries that Iraq will become a proxy battlefield, with Shiite militias deployed against U.S. interests in a showdown between the United States and Iran. Qasem Soleimani, the general in charge of the foreign operations of Iran’s Islamic Revolutionary Guard Corps, quietly traveled to Baghdad just a few days after the Aramco strike. His visit surely was no coincidence, our interlocutors noted. Still, one official with ties to the militias told us that if the United States conducted only a limited strike against Iran, the militias might not respond.

For Washington, such assurances may amount to little without a commitment from Baghdad’s central government to keep the militias under control and scale back Iran’s influence in the country. Washington may be tempted to set benchmarks for economic and military measures that Baghdad should take, but that approach has a poor track record, and it is unlikely to work now. Most Iraqis want basic services and stability above all else. They have grown hostile to a corrupt political class, including militia leaders, that is failing at the basic tasks of governing. Washington should avoid brash actions that could redirect that anger toward the United States.

For now, Washington’s best bet is to stand by the Iraqi government’s side.

The United States still has a military mission in Iraq. It consists of providing training and intelligence support to Iraqi forces battling surviving ISIS cells. Until now, a majority in the Iraqi parliament has backed this arrangement. But Iran might be able to buy off enough Iraqi parliamentarians for the government to call on the Americans to leave. Alternatively, if Washington presses Baghdad too hard, the militias could move to oust Prime Minister Abdul-Mahdi. Iraq would then face a long period of political disunity, leaving the government rudderless and unable to do anything against the militias. Even worse, the Shiite parties might agree on a new, far more anti-American prime minister. Neither outcome is good for U.S. interests in a country so central to U.S. Middle East policy.

For the time being, Washington’s best bet is to stand by the Iraqi government’s side as it attempts to resolve the internal tensions that make it so vulnerable to those from outside. Baghdad has hammered out a set of guidelines for how the government and the militias should act as regional friction builds. It has, for example, stated that no one has the right to attack foreign forces that are in Iraq at the invitation of the Iraqi government (read: the Americans). Some of the top Iran-linked militia commanders signed on. The more radical among them, such as the military commander Abu Mahdi al-Muhandis, refused to join. The government can now start to isolate the hard-liners politically. Doing so won’t solve every problem, but it’s a good first step.

As long as Iraqis want U.S. training and assistance for their fight against ISIS, the United States should provide it. A weaker central government in Iraq won’t foster regional stability and will hinder the fight against the last remnants of ISIS. Meanwhile, Iran’s influence through militias and constant intervention in Iraqi politics undermine the efforts of Iraqi politicians trying to build a stronger state. Public, official U.S. support for Iraq’s central government—including through high-level civilian and military visits—would remind Iraqis that their country is not entirely at the mercy of Iran and its proxies.

Iran knows how to play the long game in Iraq. To be successful, the United States must learn to play it, too.