Because Iran and Syria are declared and deadly enemies of America and its Sunni allies, Washington’s formal acknowledgement of their role in the conflict would be undiplomatic. But assessing the U.S. campaign’s prospects of success without recognizing the work each country is doing is nonsense.

In Syria, Iran is the biggest supporter of Assad’s army, providing his regime with weapons, intelligence, advisors, money, and shock troops from Iran’s proxy, Lebanese Hezbollah. Who are the primary beneficiaries of the airstrikes the U.S. has conducted on targets in Syria? It is no accident that Assad’s foreign minister said his government is “satisfied” with the strikes, while the loudest objections have come from Assad’s leading opponents, including the Free Syrian Army, which the U.S. has supported with weapons and training.

Last week’s U.S. airdrop of weapons to Kurdish fighters in Kobani, Syria, exemplifies these contradictions. America is currently arming Kurdish fighters affiliated with the PKK, a group the U.S. has for the past decade condemned as a terrorist organization. In attempting to explain this anomaly, Secretary of State John Kerry said, “While they are an offshoot group of the folks that our friends, the Turks, oppose—they are valiantly fighting ISIL.”

In Iraq, the reality is even more convoluted. When ISIS’s advance threatened the Kurdish capital of Erbil, who was first to come to the rescue? Some readers will be shocked to learn that the answer is Iran. Last August, before the ISIS threat appeared on many Americans’ radar, Kurdish President Massoud Barzani held a joint press conference with Iran’s foreign minister to acknowledge Tehran’s contributions and express his thanks. “The Islamic Republic of Iran was the first state to help us,” he announced.

Who is guarding Iraq’s two holiest Shiite cities, Karbala and Najaf? Units of Iran’s Islamic Revolutionary Guard Corps. As ISIS overran Mosul, Tikrit, and Samarra and drove toward Baghdad, who was the first to assist the Iraqi government? Again, Iran—13 weeks before U.S. airstrikes began near Baghdad.

The most potent military advisor to groups directly fighting ISIS on the ground is the shadowy commander of the Quds Force, Iran’s elite special-operations organization. That same commander, Qassem Suleimani, was responsible for so many American combat deaths during the Iraq War that U.S. officials described him as the personification of evil. Suleimani—who has directed the defense of Erbil, Amerli, and Baghdad in this war—controls Iraq’s three most powerful Shiite militias (Asaib Ahl al-Haq, Kataib Hizballah, and Badr Corps), at least three battalions of Iranian special forces, and an open pipeline of sophisticated weapons.

History has repeatedly reminded us that short-term necessity can fuel new long-term dangers. When ISIS is driven from Iraq, the Shiite militias that have cleared and held territory will not readily relinquish control to others. As a recent Amnesty International report notes, many of these Shiite militias have committed the same types of brutality exhibited by ISIS. Will Iraq’s Shiite-majority south turn into Iraq’s equivalent of Iranian-affiliated Hezbollah in Lebanon? And if the Kurdish Peshmerga and Sunni tribal forces succeed with outside help in eventually expelling ISIS, will they be willing to hand over the keys to a Shiite-controlled government in Baghdad? With these challenges in mind, while doing whatever is required to defeat ISIS, we should be realistic about the potentially dark consequences that may follow.