The start of American air operations against Da’ish forces in Tikrit has generated a lot of concerns that this is another foolish move by which the United States is empowering Iran and its allied Shi’ite militias in Iraq.

In this one case, however, the exact opposite is true.

What is critical to understand about the Tikrit offensive is that it was meant to discredit the United States. Two weeks ago, an extremely high-ranking Iraqi official—a senior cabinet minister—told me that the operation was presented by Abu Mahdi al-Mohandis, Iran’s most important cat’s paw in Iraq, to the Iraqi government six days before the start of the operation. At the time, he indicated that the various Shi’ite militias were going to launch the offensive against Tikrit with Iranian support, and he asked if the Iraqi government was interested in participating. He also made it clear that he and his compatriots did not want the United States to participate.

In other words, the Shi’ite militias and their Iranian backers devised this operation on their own; they intended to carry it out regardless of what the Iraqi government did and simply gave Baghdad the option of participating—but only at the price of excluding the Americans. It was an operation designed to demonstrate that the Shi’ite militias (and the forces at the disposal of the Shi’a-dominated government more broadly) were fully capable of liberating even core Sunni cities without the United States. It was intended to demonstrate that Iraq needs Iranian help, while American help was of secondary importance at best.

This seems to be why the offensive caught the United States by surprise—the Iraqi government did not know about it until the last minute and they were forced to keep the Americans in the dark or be shut out of the operation altogether. This was too dangerous for Prime Minister Haider al-Abadi, who could not afford to have the Shi’ite militias and Iran liberate Tikrit from Da’ish WITHOUT Iraqi Security Force (ISF) participation. Doing so would have demonstrated that he is not fully in control of Iraq or the military campaign to liberate Iraq. Given his own problems with Iran and its Iraqi allies, that was something he just could not afford, and so he agreed to participate, rushed some ISF units north to take part in the offensive, and gave a send-off speech to the troops—all to try to take ownership of an operation conceived by the Shi’ite militias and Iran.

The great danger in all of this is that if the operation was a success, it would reinforce the narrative that Iran was Iraq’s only real ally and the United States was both diffident and not terribly important. It would have further increased Iran’s already extensive influence in Iraq and further diminished America’s already damaged reputation. And early on, when the offensive seemed to be succeeding, this was exactly what Iraqis were saying. Indeed, the Shi’ite militias distributed all kinds of sophisticated media materials showing them feeding liberated Sunni children to demonstrate that they were welcomed by the Sunni populace and thus did not need the Americans even to reach out to the Sunnis.

Now, the sudden stalemate and the request for American airstrikes has given the United States the chance to reverse that narrative: to convince Iraqis that the Shi’ite militias cannot do it all on their own—or only with Iranian help—and that Iraq needs the United States because the United States has unique capabilities critical to Iraq’s future security. It is also important for Prime Minister Abadi in giving him some room to maneuver and not reducing him to subservience to Iran and its allies among the Shi’ite militia leadership. What’s more, if Tikrit is now liberated, Iraqis will all say that the Iranians failed, but the Americans succeeded.

Nothing could be more useful in starting to restore American influence. Indeed, that is precisely why the Shi’ite militias closest to Iran—Asaib ahl al-Haq, Khataib Hizballah, the Peace Brigades, and possibly the Badr Organization—all have either announced that they won’t participate in the fight anymore or are considering withdrawing. They do not want to see the United States succeed where the Iranians alone failed, and they know that their own role could be crucial to the fighting. So rather than do what is best for Iraq, they are doing what is best for themselves and for Iran, even at the expense of what is best for Iraq.

And that is a golden opportunity for the United States.