Iraqi security forces on Tuesday deployed tanks and artillery around Ramadi to confront Islamic State fighters who have captured the city in a major defeat for the Baghdad government and its Western backers.
After Ramadi fell on Sunday, Shi'ite militiamen allied to the Iraqi army had advanced to a nearby base in preparation for a counterattack on the city, which lies in the Sunni Muslim province of Anbar, just 110 km (70 miles) northwest of Baghdad.
As pressure mounted for action to retake the city, a local government official urged Ramadi residents to join the police and the army for what the Shi'ite militiamen said would be the "Battle of Anbar".
The White House said a U.S.-led air campaign would back multi-sectarian Iraqi forces in their attempt to regain Ramadi, whose fall exposed the limits of U.S. airpower in its battle against the radical Sunni Islamic State in both Iraq and Syria.
"The United States will be very supportive of multi-sectarian efforts who are taking command-and-control orders from the Iraqi central government," White House spokesman Josh Earnest said in Washington.
The United States is anxious that the Shi'ite militia are controlled by the Iraqi authorities rather than Iranian advisors. It is likewise worried that the fighting in Iraq will become a polarizing clash between Shi'ites and Sunnis.
Islamic State fighters set up defensive positions and laid landmines, witnesses said. The Islamists were also going house to house searching for members of the police and armed forces.
The group has promised to set up courts based on Islamic Sharia law, as they had done in other towns and cities they have conquered. They released about 100 prisoners from the counter-terrorism detention center in the city.
Saed Hammad al-Dulaimi, 37, a school teacher who is still in the city, said: "Islamic State used loudspeakers urging people who have relatives in prison to gather at the main mosque in the city center to pick them up. I saw men rushing to the mosque to receive their prisoners."
The move could prove popular with residents who have complained that people are often subject to arbitrary detention.
Sami Abed Saheb, 37, a Ramadi restaurant owner, said Islamic State found 30 women and 71 men in the detention center. They had been shot in the feet to prevent them escaping when their captors fled.
Witnesses said the black flag of Islamic State was flying over the main mosque, government offices and other prominent buildings in Ramadi.
Jasim Mohammed, 49, who owns a women's clothing shop, said an Islamic State member had told him he must now sell only traditional Islamic garments.
"I had to remove the mannequins and replace them with other means of displaying the clothes. He told me that I shouldn't sell underwear because it's forbidden," he said.
Islamic State had also promised that food, medicine and doctors would soon be available.
Dulaimi said Islamic State fighters were using cranes to lift blast walls from the streets and bulldozers to shovel away sand barriers built by security forces before they fled.
"I think they (Islamic State) are trying to win the sympathy of people in Ramadi and give them moments of peace and freedom," he said.
The decision by Prime Minister Haider al-Abadi, who is a Shi'ite, to send in the militia, known as Hashid Shaabi or Popular Mobilization, to try to retake the predominantly Sunni city could add to sectarian hostility in one of the most violent parts of Iraq.
The Abadi government had pledged to equip and train pro-government Sunni tribes with a view to replicating the model applied during the "surge" campaign of 2006-07, when U.S. Marines turned the tide against al Qaeda fighters -- forerunners of Islamic State -- by arming and paying local tribes in a movement known as the Anbar Awakening.
But a repeat will be more difficult. Sunni tribal leaders complain that the government was not serious about arming them again, and say they received only token support.
There are fears that weapons provided to Sunni tribes could end up with Islamic State.
When the Iraqi forces beat a hasty retreated from Ramadi at the weekend, they left behind a large amount of military supplies, including about a half a dozen tanks, around 100 wheeled vehicles and some artillery, the Pentagon said.
Asked whether the regular troops should have eliminated such material before quitting the city, Pentagon spokesman Colonel Steve Warren said: "It certainly would have been preferable if they had been destroyed."
Iraqi ministers on Tuesday stressed the need to arm and train police and tribal fighters. Abadi called for national unity in the battle to defend Iraq.
A spokesman for Iraqi military operations, Saad Maan, said the armed forces controlled areas between Ramadi and the Habbaniya military base about 30 km (20 miles) away, where the militia fighters are waiting.
"Security forces are reinforcing their positions and setting three defensive lines around Ramadi to repel any attempts by terrorists to launch further attacks," Maan said.
"All these three defensive lines will become offensive launch-pads once we determine the zero hour to liberate Ramadi."
The International Organization for Migration said 40,000 people had been forced to flee the city in the past four days.
About 500 people were killed in the fighting for Ramadi in recent days, local officials said.
Islamic State gains in Ramadi mean it will take longer for Iraqi forces to move against them in Mosul, where militants celebrated victory in Anbar by firing shots into the air, sounding car horns and playing Islamic anthems, residents said.