Iraqi militias who once fought ISIS with U.S. help are now working with Russian and Iranian forces to crush American-backed rebels in the strategic Syrian city of Aleppo, two defense officials have told The Daily Beast.

At least three Shia militias involved in successful battles against ISIS in Iraq—the Badr Brigade, Kata’ib Hezbollah, and the League of the Righteous—have acknowledged taking casualties in fighting in south and southeast Aleppo province. U.S. defense officials confirmed to The Daily Beast that they believe “at least one” unit of the Badr Brigade is fighting in southern Aleppo alongside other Iraqi militia groups. Those groups are backed by Russian airpower and Iranian troops—and all of whom are bolstering President Bashar al-Assad’s Syrian Arab Army.

Reports on social media say the Iraqi militias in Syria are armed with U.S. tanks and small arms they procured on the Iraqi side of the border. Those reports could not be independently confirmed.

The presence of militias fighting on behalf of Assad—a dictator that the U.S. has pledged to depose—is yet another reminder of the tangled alliances that the United States must thread as it pursues seemingly contradictory policies in its battles against the self-proclaimed Islamic State. In Iraq, these Shia militias were battling on behalf of the U.S.-backed government. In Syria, they are fighting against an American-supported rebel coalition that includes forces armed by the CIA.

In other words: The forces the U.S. once counted on to take back Iraq’s cities are the same ones the Russians now are counting on to get Aleppo back. And those militias are fighting units of the American-backed Free Syrian Army—including the 16th Division, elements of Jaish al Nasr, and Sultan al Murad—according to Nicholas Heras, a research associate at the Center for a New American Security.

U.S. officials claim not to be alarmed. “On our list of problems, one Badr brigade in Syria is way down there,” one U.S. official explained.

But the role of the Shia militias continues to be controversial. The militias are backed and funded by Iran—Badr, in fact, was created as a branch of the Iranian military. But in Syria, their role is part of the increasingly effective one-two punch of the Russian/Iranian alliance that has given the Syrian government the upper hand in the battle for Aleppo.

U.S. officials agree that without those Iraqi militias, the Syrian Army would be too weak to hold territory on their own.

It is perhaps because of these dynamics that both Russia and the U.S agreed to a “cessation of hostilities” in Syria late Thursday, to begin in one week. Even if Aleppo fell, Assad forces’ hold on the city and the country would be tenuous, at best, and would depend on unending Russian/Iranian support, an unappealing proposition for two states with fragile economies. For the U.S., the deal offered hope for ending uncomfortable alliances that had militias that once served it interests fighting opposition forces it was no longer willing to back militarily.

In the last week, Russia has launched hundreds of punishing, largely indiscriminate strikes in Aleppo. That’s allowed forces loyal to Assad—including the Iraqi militias—to move in and reclaim parts of Aleppo, cutting off the main supply route to the city. According to the Red Cross, at least 50,000 refugees have sought to flee to Turkey since the Russian assault began.

“Without the Russian airstrikes the Shiite militias would not have been as successful,” said Phillip Smyth, a researcher at the University of Maryland who studies Shiite militias. At the same time, “It is clear that Iran is routing as many fighters as possible to Syria, particularly on the Aleppo front.”

To make matters worse for the U.S. effort in Syria, among the opposition groups now losing territory in Aleppo are groups once backed by the United States. Unfortunately, those groups are also intermingled with Jabhat al Nusra, al Qaeda’s Syrian affiliate and a member of the U.S. list of terrorist organizations. The great irony of Aleppo is that U.S. strikes against the Islamic State have the perverse effect of benefiting al Qaeda.

It was Nusra forces who, in 2013 and 2014, were key in pushing ISIS out of Aleppo.

Today Nusra and its allies now are largely fighting back the Russian/Iranian offensive alone.

The fall of Aleppo, Syria’s biggest city, would be a major win for Assad supporters and potentially leave Syria with two major rival forces—ISIS and the Assad regime.

In Iraq, the Shiite militias, known as Popular Mobilization Forces, were key to important wins against the Islamic State in Amiri and Tikrit, former Iraqi President Saddam Hussein’s hometown. With the help of U.S. airstrikes, the militias were able to claim those cities from ISIS and end the jihadist group’s land grab across Iraq.

Fighting in Syria is a more lucrative undertaking, however. During the battle for the Iraqi cities of Amerli and Tikrit, militia members earned roughly $720 a month, according to Iraqi government officials. In Syria, the militiamen earn as much as $1,500 a month, Smyth said. The pay increase is a powerful incentive to join the battle—as if the appeal to sectarian loyalty were not enough.

U.S. officials are quick to say that they have never directly coordinated with the militias—small wonder, given that the Badr Brigade, for one, targeted hundreds of American troops in Iraq with Iranian-provided explosively formed projectile bombs, one of that war’s deadliest weapons.

But U.S. officials also acknowledged that the pro-Iranian militias benefited from U.S. airstrikes in Amerli and Tikrit, something the militias themselves refused to acknowledge. Only “weak people like the Iraqi army” wanted U.S. help, Haider al Amiri, the head of the Badr Brigade, said of the battle for Tikrit. He publicly celebrated Iranian support.

Either way, the fall of Amerli and Tikrit last year paved the way for the coalition and Iraqi forces to reclaim the city of Ramadi, the biggest prize to be taken back from ISIS so far. That, in turn, allowed the militias to increase their influence over Iraqi security matters.

The U.S. has been notably silent on the role of its erstwhile Iraqi allies in the ongoing battle in Syria, though it no longer predicts that Russia will become bogged down in the conflict as the Russian airstrikes provide the cover needed for the Iranian-backed forces to advance.

Meanwhile, on Thursday, Kurdish forces captured a military base in Aleppo, near the Turkish border.

—with additional reporting by Michael Weiss