U.S. troops and air assets, the Iraqi Army, Shiite militias, and the Iranian Revolutionary Guard Corps (IRGC) have coalesced into an unlikely coalition against ISIS in Mosul that is anything but “U.S.-led.” Seven months into the battle, the majority of the city has been freed from ISIS control despite the difficulties of urban warfare, a large civilian population, suicide bombers, and an operation that extended through winter. The success of this offensive is in large part due to the ability of the Iraqi army to act as an intermediary between Iran-backed militias and U.S. troops. However, a Senate bill, the Countering Iran's Destabilizing Activities Act of 2017, will likely lead the Trump administration to label the IRGC as a terrorist group. Combined with the administration’s increased alignment with Saudi Arabia against Iran, this step threatens to fracture this de facto coalition in Mosul, detract from the fight against ISIS, and recklessly endanger the lives of U.S. forces.

According to the Defense Intelligence Agency’s May 23 Worldwide Threat Assessment, “in 2016, Iraq’s various security forces made significant progress in reclaiming much of Iraq’s territory from ISIS control. Baghdad realized these gains, in no small measure, due to substantial external support—most notably U.S.-led coalition airpower and support from Iran.” It is nothing short of extraordinary that American Joint Terminal Attack Controllers, or JTACs, are calling in close air support for the same Shiite militias that mortared U.S. positions a decade earlier. But times have changed in Iraq and the greater enemy of ISIS has temporarily unified old foes. Officially, the U.S. military denies any coordination with Iran-backed Shiite militias in Iraq. However, the relative absence of fratricide amid a robust air campaign with various ground elements is a testament to the Iraqi military’s utility as an intermediary for deconfliction of the battlespace.

In other words: the reason U.S. operators are not accidentally calling in airstrikes on Iran-backed Shiite militias is because the Iraqi army is able to communicate with both.

The professionalism extends both ways. U.S. troops have been fortunate to be able to concentrate on fighting ISIS without worrying about being attacked by IRGC-backed Shiite militias, as they were during Operation Iraqi Freedom. Indeed, one of the greatest challenges of that war was the myriad of Sunni and Shiite militias that U.S. troops faced in combat.

Some in the Senate appear intent on reinserting this confusion into the battlefield, by labeling the IRGC a Specially Designated Global Terrorist group. It is possible that this label will not alter how the IRGC behaves in Mosul, but it is equally likely that it will be viewed as a green light to harass U.S. forces. This is especially true in light of the U.S. bombing of a convoy of the Iran-backed militia Kataib Imam Ali in al-Tanf Syria on May 18, followed by another attack on pro-Assad forces on June 7. Just two years ago, U.S. air strikes were supporting that militia in Baiji, Iraq. If Iran begins to believe that the U.S. is starting to care less about the fight against ISIS and more about challenging Tehran’s presence in Iraq and Syria, it too will alter its objectives, especially in Mosul. This will place the lives of U.S. soldiers in grave danger.

Even if the Senate’s terror-group designation, or the Trump administration’s contributions to growing tensions in the Gulf, do not immediately fuel a proxy war between the U.S. and Iran in Mosul, it will still place the Iraqi military in a particularly intractable position. Iraqi commanders would be forced to simultaneously coordinate with the U.S. military and a U.S.-designated terrorist organization. Their ability to deconflict ground maneuvers and air strikes would be greatly diminished. If tensions escalate, it may prove impossible for the Iraqi army to share militia positions with American JTACs, aircraft, and forward observers — risking not only the unintentional deaths of Shiite militia members and their IRGC advisors, but also Iraqi soldiers working with them. The unintended collateral damage might even be severe enough to spark a return to OIF-era fighting between U.S. troops and Iran-backed militias. Additionally, it is doubtful that U.S. commanders would be able to prevent Iraqi officers from leaking U.S.-provided intelligence to Shiite militias.

It is not difficult to imagine how quickly the Mosul offensive could spiral out of control. And it is ISIS that would most benefit from a battlespace shaped by a proxy war between the U.S. and Iran.

Some have inveighed against tolerating Iran-backed Shiite militias in the ISIS fight, warning that such groups may evolve into a “mini-IRGC” or a Hezbollah-like organization in Iraq. But opening the door to U.S. conflict with these militias will only increase their prestige, recruitment prospects, and funding. It is reckless for lawmakers to bet that the IRGC, if designated as a terrorist organization, would respond in a non-confrontational way. Any move that might detract from the fight against ISIS directly undermines U.S. efforts to stabilize Iraq and jeopardizes the safety of American troops.