BAGHDAD—The Trump administration is waging economic warfare against the Islamic Republic of Iran, and rightly so. The Islamic Revolutionary Guard Corps dominates the Iranian economy, diverting contracts and cash away from ordinary Iranians and government services and utilizing it for projects which fuel terrorism and destabilize the region.

But rather than attack the financial basis of terror with a scalpel, President Trump’s national security team is wielding an axe. When it comes to Iraq, that axe promises to benefit Iran at the expense of Iraqi nationalists and liberals who would like nothing more than to push back Iranian influence.

True, Iran wields great influence in Iraq, but it does so at the point of a gun, not in the hearts and minds of Iraqis. Just as many Iraqi Sunnis resent the Islamic State for their reign of terror in Mosul, Tikrit, and Fallujah, so too do Iraqi Shi’ites resent many of the Iranian-backed militias which have acted more as mafias than as the resistance they claim to be. Secretary of State Mike Pompeo closed the U.S. consulate in Basra in the face of supposed Iranian threats but, during the concurrent riots in Basra over the lack of government services, it was the Iranian consulate whom locals burned, not the American.

The problem is not the sanctions per se, but the deadline for their application. On Nov. 4, the U.S. demands that all countries end imports of Iranian oil and gas. Ending dependence upon Iran is a goal Iraq shares, even if not always for the same reasons. Decades of war, sanctions, mismanagement, and corruption left Iraq’s oil industry in tatters. That has been happily reversed (Iraq now has an increasing surplus) but Iraq still does not have sufficient natural gas, although it has been working with American companies to capture rather than simply flare off gas. The goal of Baghdad in awarding those contracts was, without U.S. prompting, to lessen dependence on Iranian (or any other) gas imports. But, until those projects are complete, and they will not be by Nov. 4, imports remain necessary.

Should Iraq just bite the bullet and cut off gas imports, even if it results in electricity shortages? Here, Basra should be a lesson: Basra had simmered for years, but an exceptionally hot summer as well as lack of electricity and access to clean drinking water effectively sounded the death knell for Prime Minister Haider Abadi’s government. Abadi partnered closely with the United States and worked to restrain Iranian influence. While Prime Minister-designate Adil Abdul-Mahdi is not as much in Iran’s camp as senators like Florida Republican Marco Rubio seem to believe, what fragile support he and other technocrats have will implode if services precipitously decline. The real pro-Iran hardliners—men like Hadi Amiri, the head of the Badr Corps—are waiting in the wings to step in should such a scenario occur. Likewise, it is the nationalism of Iraqis which provide the best hope to mitigate Iranian influence in Baghdad, and it is the reason why Iraqi resentment toward Iran remains high. Should the United States sanction Iraq during the critical period of government formation, however, it is a no-brainer for those under Iran’s thumb to use Iraqi umbrage and the rhetoric of nationalism as a tool to marginalize all those who see Iraq’s future as neutral, let alone tied to the West.

Iraq has a real problem, and has worked with Washington diligently to resolve it. Rather than a precipitous move that will bolster the pro-Iran camp during government formation, perhaps it would be wiser to help Iraq wean itself off Iran and solidify its moderation and independence.

Michael Rubin (@Mrubin1971) is a contributor to the Washington Examiner's Beltway Confidential blog. He is a resident scholar at the American Enterprise Institute and a former Pentagon official.