The fate of Tikrit remains uncertain as Iraqi forces press their assault against fighters from ISIS holed up in the city, but some larger political ramifications for the battle are becoming clear even now. Regardless of how the fighting goes the United States and Iran will have found themselves on the same side of a major confrontation in the region for the first time in decades, a ground reality that challenges Washington’s longstanding political alignments in the region.

Since the Iranian Revolution the United States has essentially made Israel and Saudi Arabia its chief partners in the Middle East. Washington’s relationship with both has always been deeply conflicted, despite efforts on all sides to maintain outward appearances of unity. The current frostiness between President Obama and Israeli Prime Minister Benjamin Netanyahu and quiet but unending complaints from Washington about Saudi support of Islamic radicalism are just two of the more conspicuous signs of troubles. Meanwhile, the stalled Arab-Israeli peace process and the dramatic rise of U.S. oil production only add to the doubts over the usefulness of America’s special relationship with both countries.

America’s relationship with Iran, however, has been undergoing a slow albeit fitful transformation. Since at least the 1990s certain quarters of Tehran and Washington have steadily looked for ways out of the enmity that has defined relations since 1979. Politics in both countries have often thwarted such efforts. But the politics of war in the Middle East has now presented another opportunity for America and Iran to cooperate in the region.

Iranian military commander Qassem Soleimani, the head of the Revolutionary Guards Quds Force, is openly on the frontlines in Tikrit, orchestrating the actions of Shi’ite militias supporting Iraqi security forces. His presence in part signifies Tehran’s answering of a call Washington aired months ago, when ISIS first seized territory. Almost immediately the Obama administration appealed for a regional coalition to take action. In step with years of U.S. policy toward the Middle East, the White House and the Pentagon imagined an Arab coalition led by Saudi Arabia and Jordan and hopefully including Egypt and other Persian Gulf players such as the United Arab Emirates. And indeed such a collation has taken shape, but it has been unable to muster any meaningful force against ISIS. Jordanian and Egyptian airstrikes, for all their ferocity, have hardly dented the group. And there is virtually no talk of a coalition ground force to confront ISIS among Arab nations, something all observers now acknowledge is undoubtedly needed.

Iraq’s inability to reclaim and hold territory it lost to ISIS, despite the staggering amount of military assistance the country has received from the United States, has reveled a new political truth for the whole region. Iraq needs help from a regional power to survive. The Obama administration hoped that help would come from Saudi Arabia and its other allies in the Persian Gulf. Instead it is coming from Iran, which has put together a coalition of its own in a bid to shore up Iraq. Soleimani effectively stands at the head of a force that includes Iraqi troops, Iranian supported Iraqi militias, Sunni tribesman from Anbar Province and even fighters from Hezbollah.

At one point during the U.S. occupation of Iraq American commanders said militia fighters backed by Iran were responsible for more deaths of American soldiers than al-Qaeda. Now U.S. commanders are watching an Iranian general lead a charge of militiamen against an Iraqi city with tacit approval and, perhaps, some hope that for the first time in months ISIS might feel real fear. Leaders in Jerusalem and Riyadh who have a stake in preserving the old alliance system have reason for concern if not fear given all this. If Iranian action can change the strategic calculation in Iraq, then America essentially has a new partner in the Middle East. That will undoubtedly further weaken alliances already showing clear signs of strain.