Islamic State militants said they had taken full control of the western Iraqi city of Ramadi on Sunday in the biggest defeat for the Baghdad government since last summer.
In a statement, the group said it had seized tanks and killed "dozens of apostates", its description for members of the Iraqi security forces.
Ramadi is the capital of Iraq's western Anbar province, which is dominated by Sunni Muslims. Prime Minister Haider al-Abadi signed off on the deployment of Shi'ite militias to attempt to seize back the area, a move he previously resisted for fear of provoking a sectarian backlash.
Earlier, security sources said government forces evacuated a key military base after it came under attack by the insurgents, who had already taken one of the last districts still holding out.
It was the biggest victory for Islamic State in Iraq since security forces and Shi'ite paramilitary groups began pushing the militants back last year, aided by air strikes from a U.S.-led coalition.
The U.S. Defense Department, while not confirming the fall of Ramadi, sought to play down the impact on the broader Iraq military campaign of an Islamic State seizure of the city.
"Ramadi has been contested since last summer and ISIL now has the advantage," Pentagon spokeswoman Elissa Smith said, using another acronym for Islamic State. She said the loss of the city would not mean the overall Iraq military campaign was turning in Islamic State's favor, but acknowledged it would give the group a "propaganda boost."
"That just means the coalition will have to support Iraqi forces to take it back later," Smith said, adding that the United States was continuing to provide it air support and advice.
The Iraqi government had vowed to liberate Anbar after routing the militants from the city of Tikrit last month. But the security forces, which partly disintegrated under an Islamic State onslaught last June, have struggled to gain traction in the vast desert province.
An officer who withdrew from the besieged army base said the militants were urging them via loudspeaker to discard their weapons, promising to show mercy in return.
"Most of the troops withdrew from the operations command headquarters and Daesh fighters managed to break in from the southern gate," the officer said. Daesh is an Arabic name for Islamic State.
"We are retreating to the west to reach a safe area".
Earlier on Sunday, Anbar provincial council member Athal Fahdawi described the situation in Ramadi as "total collapse".
It was one of only a few towns and cities to have remained under government control in the vast desert terrain, which borders Saudi Arabia, Syria and Jordan.
Islamic State, which emerged as an offshoot of al Qaeda, controls large parts of Iraq and Syria in a self-proclaimed caliphate where it has massacred members of religious minorities and slaughtered Western and Arab hostages.
The United States and its allies have been pounding the militants for months with air strikes in both countries. Washington said on Saturday its special forces had killed a senior Islamic State figure in a raid into Syria.
Over a period of 24 hours up to 0500 GMT (0100 EDT) on Sunday, the U.S.-led coalition carried out seven air strikes near Ramadi, according to a statement - the highest number on any single location in Iraq and Syria.