Secretary of State Mike Pompeo privately warned Iraq this week that the United States would close its embassy in Baghdad if the Iraqi government doesn’t move to stop attacks by Iranian-backed militias on the American compound.

Pompeo’s demand creates a stark dilemma for Iraq’s new prime minister, Mustafa al-Kadhimi, who until now had been a Trump administration favorite. The Iraqi leader wants to curb Iran’s proxy forces, but not at the cost of committing political suicide. If Pompeo follows through and closes the embassy to protect Americans, Iran and its allies might claim a major propaganda victory; but the closure could also be a prelude to heavy U.S. airstrikes against the militias.

Iraq is the place where a U.S.-Iran confrontation could explode in the next few weeks, creating an “October surprise” before the U.S. presidential election. Iran has been cautious about directly provoking the Trump administration in this campaign season, preferring to operate in the deniable battlespace of Iraq. Pompeo has now made that covert campaign more difficult, but in the process has increased the possibility of open conflict.

The Iraq standoff poses potential dangers in every direction: If attacks by Iranian-backed militias kill Americans, the Trump administration will likely counterattack. If Kadhimi strikes at the Shiite militias, as Pompeo demands, Iran could punch back hard, and his fragile regime could implode. Pompeo wants to stiffen Kadhami’s backbone, but presumably not to the breaking point.

“We believe that Kadhimi wants to do the right thing, but he’ll have to do more and faster. We won’t be sitting ducks,” a senior State Department official said in an interview Friday. The official said there is an “obvious risk to American life if these attacks continue.”

Violence by Iranian-backed militias has been escalating in recent weeks, despite Kadhimi’s promises of a crackdown. So far this month alone, there have been 25 attacks on convoys carrying supplies to U.S. or coalition facilities, on the Green Zone where the U.S. Embassy is located, or on the Baghdad airport, according to a compilation by Iraq analyst Joel Wing. Last month, he counted 24 such attacks.

An encouraging call for greater protection of embassies came Friday when the influential Iraqi cleric Moqtada al-Sadr, a radical nationalist who sometimes resists Iranian pressure, proposed the creation of a committee “to investigate the security violations that the diplomatic missions … are being subjected to in a way that is detrimental to Iraq’s reputation in the international arena.”

Kadhimi immediately endorsed Sadr’s proposal, tweeting: “We affirm that the hand of law is above the hand of those who break it. … The outlawed weapon has no place in Iraq.”

Pompeo’s pressure campaign began with a call Sunday to Iraqi President Barham Salih, according to Iraqi24, a Baghdad news site. The Iraqi news account said Pompeo had warned: “The decision to close the embassy in Baghdad is in President Trump’s hands and is ready. … If our forces withdraw and the embassy is closed in this way, we will liquidate all those who have been proven to have been involved in these attacks,” according to a translation of the Arabic news article. Pompeo specifically named two Tehran-backed groups, Kataib Hezbollah and Asaib Ahl al-Haq.

Kadhimi, a former Iraqi intelligence chief, was welcomed by Trump at the White House last month. U.S. officials view him as the most promising Iraqi leader in years, in part because he’s not tied to any of Iraq’s corrupt, sectarian political parties and has tried to keep his distance from Tehran.

One Iraq analyst summed Kadhimi’s appeal to disgruntled Iraqis this way: “The Iraqi people are turning against Iran’s influence in Iraqi internal affairs, against the Iran-backed militias and the politicians who enable them, and against the rampant corruption that Iran’s influence promotes.”

The danger of Pompeo’s ultimatum is the same one that has plagued the United States since it invaded Iraq in 2003. Iran is near and plays a long game; America is far away and demands quick results. Iraq has shown us repeatedly that American military power is overwhelming but can’t dictate political outcomes. Direct threats that become public, like Pompeo’s, rarely work out as intended.

Read more: