The Iranians have suffered a humiliating defeat.

More than 20,000 fighters with Iranian-backed Shiite militias have withdrawn from the 3-week-old battle to oust Islamic State militants from the Iraqi city of Tikrit.

And the Iraqis have turned back to the U.S. military for help.

U.S. aircraft launched airstrikes in Tikrit on Wednesday for the first time since the battle began, providing vital military support that came only after the Iraqi government agreed to seize command and control of the fight on the ground and temporarily halt operations of Iranian-backed militias.

"The Shiite militias that were there have pulled back from that area," Army Gen. Lloyd Austin, the chief of U.S. Central Command, said Thursday on Capitol Hill.

"Preconditions for us to provide support were that the Iraqi government had to be in charge of this operation. We had to know exactly who was on the ground," Austin said.

On Wednesday night, U.S. and coalition aircraft unleashed 17 airstrikes on Islamic State targets in Tikrit, destroying buildings, bridges, checkpoints, staging areas and a command and control facility.

The start of U.S. airstrikes in Tikrit punctuated an intense geopolitical drama that began three weeks ago when the Iraqi government stunned many American military officials by mounting a massive effort to seize the strategically important city without asking the U.S. for help.

The Iraqis instead sought large-scale, open military support from Iran, whose Shiite regime is a strong ally of Iraq's Shiite-led government in Baghdad.

The Iranian-funded militias of Iraqi Shiites far outnumbered the Iraqi government's own military forces, U.S. officials said.

Iran's Revolutionary Guards Corps provided tanks and artillery, and Iran's most powerful military leader, Gen. Qasem Soleimani, gave TV interviews from the front lines in Tirkit.

Yet the Iranian-backed effort stalled and Islamic State forces continue to hold the city.

"It shows that, for the Iraqis to do what they want to do, they really need American support ... they can't do this with just the Iranians," said Adam Tiffen, a member of the Truman National Security Project's Defense Council and an Iraq War veteran.

Defense Secretary Ash Carter said in early March that he had "great concern" about Iran's military presence in Iraq because it could inflame sectarian tensions that are driving support for Islamic State militants.

The fight against the IS stronghold in Tikrit began with considerable bluster.

"When Tikrit operations kicked off … we heard quite a bit from the Iraqis and some even from the Iranians, some fairly high-confidence statements about how rapidly the operation in Tikrit would go," Army Col. Steve Warren, a Pentagon spokesman, said Wednesday.

"Obviously they were incorrect," Warren said.

"I think it's important that the Iraqis understand that what would be most helpful to them is a reliable partner in this fight," Warren said. "Reliable, professional, advanced military capabilities are something that reside very clearly and very squarely with the [American-led] coalition."

Austin said the campaign in Tikrit has failed so far because the Iraqis were not in control of the forces on the ground and those forces were not trained and equipped well enough to take on intense urban combat operations that present unique challenges.

Austin acknowledged that U.S. and Iranian goals in Iraq are similar — to defeat the Islamic State militants.

But he also recalled that just a few years ago, U.S. forces were battling those same Iranian-backed Shiite militias.

"I hope we never coordinate or cooperate with Shia militias," Austin bluntly said.