One irony about the fight against Islamic State is that the nations now striking the extremist group the hardest also dislike each other the most.

Iran’s supreme leader, for example, declared last month that the United States has “a corrupt intention and stained hands” and cannot be trusted to fight against Islamic State. Meanwhile, State Department spokeswoman Jen Psaki said Washington is “not and will not coordinate militarily” with Tehran.

Washington and Tehran say they abhor each other. Yet they appear to be tacitly working together — if awkwardly and at arm’s length — to fight Islamic State. When everyone hates everyone else (welcome to the Middle East!) and pursues their own self-interest, strange political alliances can emerge.

Is this deemed an ugly, politically distasteful relationship for all sides? Yes. Is our ad hoc alliance good enough to degrade and destroy Islamic State? Maybe not. Is Washington tacitly working with nations and organizations that have American blood on their hands? You’d better believe it.

So what does this U.S.-Iran non-alliance alliance against Islamic State actually look like?

Iranian troops and U.S. airpower: The Iraqi Army is largely a wreck, unable to retake northern Iraq from Islamic State and its allies. The army is in such a sorry state that it allied over the summer with murderous Shi’ite militias — many trained by Iran and Hezbollah outside of the country — to make limited gains.

In addition, Iranian handlers, led by the omnipresent Quds Force chief Qasem Soleimani (who has appeared in a lot of photos lately), backed Shi’ite militias, Iraqi troops and Kurdish peshmerga and repulsed Islamic State from the Iraqi town of Amerli, all aided by U.S. warplanes. Those involved strenuously denied that Washington and Tehran coordinated any military action — but U.S. airstrikes helped turn the tide against the militants.

Presumably military planners on all sides view this as a model — if a terribly flawed one — for future battles against Islamic State. The United States provides airpower, the key piece of modern warfare that Iran and its proxies cannot replicate, and one that Islamic State militants now do not seem to have effective countermeasures against.

Iran has also appeared willing to deploy its elite and regular ground forces to achieve specific goals in the Iraqi battle zone. Both countries are also concerned with “mission creep,” so each seems willing to stay out of each other’s way.

Discreet, low-level intelligence sharing: The United States can degrade Islamic State from the air, but Iran is crucial to root out and destroy them on the ground, at least on the frontlines. Since Washington doesn’t talk to Tehran directly, the Pentagon still presumably coordinated airstrikes with Kurdish and Iraqi intermediaries.

There’s little indication, for example, that this communication occurred in Amerli. Yet after the bombing runs, there were few reports of Iraqi, Kurdish or Shi’ite militia casualties or Iranian losses. So there must have been some level of coordination — no matter how indirect.

U.S. planes have to fly long distances to strike their targets. Without spotters on the ground to guide them, mistakes inevitably arise and people die. Indiscriminate bombing runs during a conflict — where hostile and friendly fighters can look the same to pilots — usually end badly for those on the ground. Yet there were suspiciously few reports of friendly fire during this battle.

Compare this to the civilians reportedly killed in recent U.S. airstrikes in Syria, where the Free Syrian Army claims there is little coordination between it and American pilots. (The U.S. seems to be now working with some Kurdish ground forces in the battle for Kobani, however.) No interaction between air and ground forces means many preventable casualties.

So in Iraq, there is communication between Americans — and someone. And that someone probably speaks Persian.

Talks on the side of the Iranian nuclear negotiations: U.S. and Iranian officials publically deny that sharing concerns over Islamic State distracts from the technical talks in Vienna. With good reason. Iranian President Hassan Rouhani’s government could scarcely admit to colluding with Americans without incurring high domestic political costs — even if he could control the Iraq portfolio. The Obama administration also cannot admit to such realpolitik. “We’re not,” Susan Rice recently reiterated, “in coordination or direct consultation with the Iranians.”

Should the United States and Iran conclude a successful nuclear deal in November, we might see follow-on consultation on anti-Islamic State efforts, and the stage will have been set around central European conference tables. That isn’t to say that Washington should replace nuclear concessions with offers of cooperation against the terror group. Keeping the two issues separate is critical to reach a definite agreement. But if all goes well, the United States could start talking with Iran about other thorny issues — such as fighting Sunni jihadists.

Washington should of course remain wary about Iran’s motives in Iraq. Tehran has spent much of the past decade trying to increase its influence throughout the Middle East, with decidedly mixed results. In addition, Soleimani and his Quds Force are partly responsible for destabilizing Iraq in the first place.

Iran is reaping the whirlwind, and Washington should be careful not to get caught up in it. In Syria, the battle lines against Islamic State are blurry. Tehran is backing President Bashar al-Assad’s forces in their murderous counterinsurgency campaign, while Washington is looking to support anti-Assad rebels. And if Americans are worried about “being the air force for Shi’ite militias,” the Saudis and other predominantly Sunni countries would be apoplectic over the idea of working with Iran, however discreetly.

If the United States and Iran are strange bedfellows, they’re not going to share the same bed often — and they’re going to do so with great embarrassment.

But Tehran already has the ears of politicians in Irbil and Baghdad. Perhaps more than Washington does, or ever did.

Let’s exploit all forms of leverage to fight Islamic State for our own ends. That’s how you win wars.

PHOTO (TOP): Smoke riseS over Syrian town of Kobani after an airstrike, as seen from the Mursitpinar crossing on the Turkish-Syrian border in the southeastern town of Suruc in Sanliurfa province, October 21, 2014. REUTERS/Kai Pfaffenbach

PHOTO (INSERT 1): Tracer rounds cross the sky over the Syrian town of Kobani during an airstrike, as seen from the Mursitpinar crossing on the Turkish-Syrian border in the southeastern town of Suruc in Sanliurfa province October 21, 2014. REUTERS/Kai Pfaffenbach

Kurdish peshmerga troops participate in an intensive security deployment against Islamic State militants in Zumar, October 25, 2014. REUTERS/Ari Jala