WASHINGTON — Islamic State fighters used a sandstorm to help seize a critical military advantage in the early hours of the terrorist group’s attack on the provincial Iraqi capital of Ramadi last week, helping to set in motion an assault that forced Iraqi security forces to flee, current and former American officials said Monday.

The sandstorm delayed American warplanes and kept them from launching airstrikes to help the Iraqi forces, as the Islamic State fighters evidently anticipated. The fighters used the time to carry out a series of car bombings followed by a wave of ground attacks in and around the city that eventually overwhelmed the American-backed Iraqi forces.

Once the storm subsided, Islamic State and Iraqi forces were intermingled in heavy combat in many areas, making it difficult for allied pilots to distinguish friend or foe, the officials said. By that point, the militants had gained an operational momentum that could not be reversed.

“The dust storm at the very least neutralized capabilities that could have been decisive,” said one former senior military official, who spoke on the condition of anonymity to discuss confidential battle assessments.

The episode reveals the limitations in America’s formidable aerial arsenal and also the weaknesses in the Iraqi military’s ability to reinforce and resupply troops facing heavy attack, particularly in Ramadi and elsewhere in Anbar Province, where the government has struggled to recruit capable Sunni troops.

Although American military officials challenged the notion last week that bad weather hindered the effectiveness of the airstrikes, other officials in the United States and Iraq said Monday that the sandstorms played a more important role than previously acknowledged. Islamic State fighters have used this tactic before — in January they launched a surprise attack against Kurdish forces in Kirkuk during a sandstorm — but not with such formidable results.

Pentagon officials vowed that the Iraqis would retake Ramadi and pointed to 19 airstrikes since the sandstorm subsided.

But Gen. Martin E. Dempsey, the chairman of the Joint Chiefs of Staff and a former commander in Iraq, offered a more sober assessment on Monday: “ISIL’s gains in Ramadi are a serious setback for its long-suffering inhabitants,” he said, using another name for the Islamic State, which is also known as ISIS. “It is also a setback for the I.S.F.” I.S.F. stands for Iraqi security forces.

“Setbacks are regrettable but not uncommon in warfare,” General Dempsey continued. “Much effort will now be required to reclaim the city.”

Col. Steve Warren, a Defense Department spokesman, told reporters that although “ ‘cut and run’ is a mischaracterization” of the Iraqi forces’ withdrawal, there is “a realization that ISIL has the upper hand.”

Since retaking Ramadi cannot be done by airstrikes alone, the United States is once again finding itself in an uneasy parallel war with Iran against the Islamic State. A column of 3,000 Shiite militia fighters, many supported by Iran, has arrived at a military base near Ramadi as part of the effort to reclaim the city. American officials say they will continue their air campaign as long as the Shiite militias are led by the Iraqis, and not by Iranian advisers.

“The militias have a part to play in this,” Colonel Warren said. “As long as they’re controlled by the central Iraqi government, there’s a place for them.”

Colonel Warren’s remarks were far different from those two months ago by Gen. Lloyd J. Austin III, the commander of the United States Central Command, when the fight to retake the city of Tikrit began. During testimony to Congress, General Austin denounced the militias, which had once conducted a deadly campaign against American forces in Iraq. “I will not — and I hope we will never — coordinate or cooperate with Shiite militias,” he told a congressional hearing.

But in the end, the administration modified that position and used the Iraqi government as a go-between for airstrikes against Islamic State targets in Tikrit while Shiite militias operated on the ground. That template may be reused now in Ramadi.

But Ramadi is not Tikrit, foreign policy experts cautioned.

Ramadi, the capital of the Sunni heartland province of Anbar, is a bigger city, and therefore it is much harder to conduct airstrikes without large numbers of civilian casualties. A meaningful ground campaign would be necessary to retake Ramadi, and there is also the danger that if that campaign is led by the Shiite militias, it could quickly descend into a sectarian blood bath.

“There should be no expectation that the militias can just show up and save the day,” said Landon Shroder, an intelligence analyst for corporations in Iraq. “For some, the arrival of the militias in Anbar will only reinforce the Islamic State’s messaging, and for others, the arrival of the militias will be perceived to be just as bad, if not worse, than the Islamic State.”

Senators John McCain, Republican of Arizona, and Lindsey Graham, Republican of South Carolina, said in a statement on Monday that there were “disturbing” reports that the Shiite militias were preparing a counteroffensive in Ramadi.

“Whatever operational success Shia militias may have in Anbar would be far exceeded by the strategic damage caused by their violent sectarianism and the fear and suspicion it breeds among Iraqi Sunnis,” the statement said. “Moreover, the prominent role of these militias continues to feed the perception of a Baghdad government unable or unwilling to protect Sunnis.”

Tim Arango contributed reporting from Baghdad, Iraq.

A version of this article appears in print on , on Page A10 of the New York edition with the headline: ISIS Fighters Seized Advantage in Iraq Attack by Striking During Sandstorm. Order Reprints | Today’s Paper | Subscribe