Forces loyal to Iran are threatening to break ISIS’s grip on the key Iraqi city of Tikrit. Officially, the American military isn’t helping these Shiite militias and Iranian advisers as they team up with Iraqi forces to hit the self-proclaimed Islamic State. But U.S. officials admit that American airstrikes are a major reason Iran’s proxies are advancing on Tikrit, Saddam Hussein’s hometown.

The U.S.-led air campaign has not only crippled ISIS’s ability to move freely. It’s also providing air cover for Iraqi troops and the Iranian forces fighting alongside of them. It is a perilous, yet unspoken, military alliance between the U.S. and its top regional foe that some said could lead to an ISIS defeat in the short term and ethnic cleansing of Sunni Iraqis in the long run.

“Like it or not, right now [the U.S. and Iran] are on the same side,” said Vali Nasr, dean of Johns Hopkins School of Advanced International Studies and longtime Iranian expert.

U.S. officials have repeatedly stated their concerns about the sectarianism that could emerge even as the strategy now decisively helps one side, the Shiite, in the push to defeat ISIS.

But two U.S. officials concede that the effect of the airstrikes helps Shiite forces—while swearing that there is no strategy to help Iran. Rather, as one explained, “the goal is to provide Iraqi forces the operational space to take back territory.”

The eight-month U.S.-led air campaign has consistently targeted any large groups of suspected ISIS forces moving around the country. That’s made it all but impossible for ISIS to send major reinforcements to come to the aid of ISIS fighters under fire from Iraqi forces, Shiite militias, or Kurdish peshmerga forces.

ISIS “has shown a pretty good ability to move small number of forces. What they can’t do is move 5,000 people at a time” because of the U.S.-led air campaign, Christopher Harmer, a senior naval analyst with the Middle East Security Project at the Washington, D.C.-based Institute for the Study of War. ISIS is “spread a mile wide and an inch deep, and I don’t think they have the mass to put bodies everywhere they want.”

Such limitations for ISIS, courtesy of the coalition airstrikes and Iranian ground forces, have been the keystone of many of Iraq’s military victories over ISIS. The Iraqi win in the city of Amerli last fall was a product of U.S.-led airstrikes and Iranian advisers, troops, and equipment on the ground. In the Kurdish city of Irbil, Kurdish forces received aid and equipment from Revolutionary Guard forces on the ground and an aggressive air campaign by the coalition. There have been reports that Iran has conducted its own airstrikes.

Given the pattern, it seems all but an unspoken strategy shared by two foes brokered by the Iraqi military. It is what Nasr called “a kind of don’t ask don’t tell” approach to ISIS. The U.S. quietly supports Iranian-backed troops on the ground because both want to defeat ISIS, albeit for very different reasons.

“I think the American strategy is working because the Iranian is doing all the fighting. We know they are there, and we are providing airpower,” said Nasr, author of The Indispensable Nation. “The Iraqi military are up not to the job on its own. The few [U.S. and coalition] advisers we have on the ground could not have turned this on their own.”

The campaign for Tikrit began March 1, when Iraqi ground forces—bolstered by Iranian advisers, troops, and equipment—launched their biggest and most symbolic offensive to date in the Sunni-dominated city. Iranian-led Iraqi forces moved west and north toward the city. On the west side of the Tigris River were entrenched ISIS forces; on the other a formation of Iraqi militias and government forces, led by General Qassem Suleimani, the Iranian Quds force commander.

All the while, the U.S.-led coalition continued conducting airstrikes, launching roughly 1,500 in Iraq so far and destroying thousands of ISIS weapons and revenue sources. U.S. forces conducted about 80 percent of those strikes, according to Pentagon statistics.

With no ability to move forces from places like Syrian border and the northern city of Mosul—thanks to the U.S.-led airstrikes—ISIS is limited to the forces already in the city. Outnumbered by thousands of Iraqi forces and militiamen, ISIS has had to surrender towns surrounding Tikrit to double down on one of its biggest Iraqi strongholds, Iraqi and U.S. defense officials told The Daily Beast.

On Wednesday, Iraqi forces inched closer to Tikrit, taking up positions at a nearby military hospital and police station. With no additional ground forces possible because of the air campaign, ISIS has responded by placing explosives on the roads leading to the city, apparently before they retreated to the center city.

For now, it may be working. But there are major long-term risks with such an approach because U.S. and Iranian interests in Iraq will eventually clash. While the U.S. seeks to leave behind an independent Iraq, Iran seeks an Iraq increasingly dependent on it. If Iran leads the first major victory against ISIS, it could lead to potentially more Iranian influence in Iraq and eventually the ethnic cleansing of Sunnis there, observers warned.

Army General Martin Dempsey, the chairman of the Joint Chiefs of Staff, told the Senate Foreign Relations Committee on Wednesday that he’s worried about Iraq’s cohesion.

“We are all concerned about what happens after the drums stop beating and ISIL is defeated, and whether the government of Iraq will remain on a path to provide an inclusive government for all of the various groups within it,” Dempsey said, using the government-preferred acronym for the group.

The U.S. and Iran are in the midst of stalled talks over Iran’s nuclear program. Following last year’s agreement Iran has made substantial progress toward de-enrichment. But the current talks face stiff criticism from both nations’ conservative factions, both of whom reject a compromise deal.

The emerging reality of a possible de facto U.S.-Iran joint effort in Iraq befuddled senators on Capitol Hill during a hearing Wednesday in which Dempsey, Secretary of State John Kerry, and Defense Secretary Ashton Carter all appeared. When Florida Sen. Marco Rubio suggested that Iran did not want the United States airstrike campaign to succeed in Iraq, Kerry said that Iran “wants us to destroy ISIL.”

Washington has said it has no intention of helping Iran against ISIS from the ground. But Dempsey, for one, was quick to spell out how much of a military investment Iran has made in Iraq. The force in Tikrit consists of 3,000 Iraqi security forces and the 20,000 Iranian-backed Shiite militia members, Dempsey said, many accompanied by Iranian advisers and troops. The chairman also said he was concerned about Iranian influence on Iraq.

Later Wednesday, during his first briefing with reporters since taking the post, Carter dodged a question about whether an operation in Mosul—ISIS’s Iraqi capital—could lead to U.S. and Iranian forces fighting ISIS together. Instead, Carter said that the U.S. is closely watching for sectarian tensions.

Some Iraqi officials said its forces could take Tikrit within days, but it remains unclear whether they could hold the city and if so, for how long. Defense officials have their fingers crossed that Iran’s offense will root ISIS in Tikrit but not lead to a sectarian bloodbath when families from that city attempt to return home. Many fled to the nearby Kurdish-dominated city of Irbil.

The Iranian-backed Iraqi forces and militiamen “are going to run ISIL out of Tikrit,” Dempsey told the Senate committee Wednesday. “The question is what comes after.”