Even so, Mr. Karhut said that on Friday afternoon he was told by officials in Baghdad that a brigade of elite counterterrorism forces had been sent to Ramadi.

By Friday evening, battles were raging between pro-government forces and militants in several pockets of Ramadi. But one senior security official in the city said that 90 percent of the city was in the Islamic State’s hands, and unless the government in Baghdad sent more reinforcements to the city it was likely to fall completely.

The official said that he had warned officials in Baghdad on Thursday night about the offensive as it began. “There was no reaction,” said the official, who spoke on the condition of anonymity because he was criticizing superiors. “I said, ‘Please save Anbar!’ ”

He said the Islamic State offensive was partly being carried out by a fresh batch of fighters who had been sent from Raqqa, the Syrian city that is the terrorist group’s de facto capital. Speaking by telephone Friday afternoon from his besieged compound in Ramadi, the official asked a reporter to pray for him.

Mr. Abadi met with his military commanders on Friday evening to discuss the situation, according to a short statement published by his website. Later, around 10 p.m., Mr. Abadi appeared on television and promised a tough response, saying “the next hours will unfold with victory in Anbar.”

He continued, “I ask the politicians of Anbar to be unified and with one voice to protect Iraq and Iraqis. They must be with their fighters in the battle, to urge them to resist and to motivate the security forces.”