BAGHDAD: Islamic State fighters seized the government compound in the city of Ramadi on Friday and edged closer to what would be their biggest victory in Iraq this year, officials said.
The loss of the capital of Anbar province, which Prime Minister Haider al-Abadi had said would be the next target of government forces after wresting back Tikrit last month, would be a major setback.
The government stressed that Ramadi had not fallen yet and announced that a major counter-offensive was under way as Abadi held an emergency meeting with top security officials.
IS has threatened to take control of Ramadi for months, and the breakthrough came after a wide offensive on multiple fronts in the province, including an assault using several suicide car bombs in Ramadi on Thursday.
The militants seized the government complex at around 2:00 pm (1100 GMT) and raised the black flag, a police officer said, giving them nearly full control over Anbar's capital.
IS "now occupies the government centre in Ramadi and has also raised its flag over the police HQ for Anbar", the police major told AFP, on condition of anonymity.
The group itself issued a statement saying its fighters broke into the government complex, and blew up the adjacent buildings of Anbar's governorate and the police headquarters.
A senior tribal leader in charge of the coordination of local fighters with regular government forces also confirmed the government complex had fallen.
"The only (government) forces still fighting are confined to a few pockets in Ramadi but they have no command post any more," Sheikh Hekmat Suleiman told AFP by phone.
Provincial council member Adhal Obeid al-Fahdawi said civilians were fleeing the city centre, the second time in a month they have done so following another IS offensive in April.
"Families are trying to flee on foot, leaving their cars and homes behind, but most areas around Ramadi are under IS control," said Sheikh Jabbar Adjadj al-Assafi, a tribal leader.
The IS said earlier that it had launched several attacks on army positions east of Ramadi, including one by a British suicide bomber it named as Abu Musa al-Britani.
It claimed to have slain dozens of men, including 13 soldiers in an attack on a hill east of Ramadi and 14 Sunni tribal fighters they said they executed after capturing the Jamiya neighbourhood.
Iraqi security sources and IS said the town of Jubbah, about 180 kilometres (110 miles) northwest of Baghdad, had also been seized by militants.
A tribal leader said the town, near the large Al-Asad airbase where several hundred US advisers are stationed, had been left insufficiently protected.
"The situation in Ramadi is dangerous but the city has not fallen," Anbar Governor Sohaib al-Rawi said on Twitter.
After a meeting with the defence minister and other top officials, Abadi went on state TV and vowed to turn the situation around.
"This is like any war, there might be pullback here and there, but we are determined to defeat Daesh," he said, using an Arabic name for IS.
"With the resistance of our troops and the loyal sons of Anbar... the enemy will be routed again as it was in previous confrontations," Abadi said.
An interior ministry statement said a counter-attack had begun.
It said reinforcements had been sent to the Ramadi front and announced a series of strikes by the Iraqi air force in other parts of the province.
Both IS and government officials also reported several attacks since Thursday east of Fallujah, only a few miles from the borders of Baghdad governorate, but their outcome remained unclear.
IS named its latest Ramadi operation after one of its slain leaders, Abu Muhannad al-Swaidawi, who was killed in a US-led air strike, according to jihadist forums.
The organisation's leader, Abu Bakr al-Baghdadi, broke a six-month silence on Thursday with an audio recording of a speech in which he played up the Anbar battle.
The group, which also controls parts of Syria, swept across the Sunni heartland of Iraq last year before proclaiming a "caliphate" and attracting record numbers of foreign fighters.
A US-led air campaign launched in August helped the central government in Baghdad and the autonomous Kurds in the north turn the tide on IS.
The militants have since lost significant ground but still hold Mosul, the country's second city, and much of Anbar, whose capital lies 100 kilometres (60 miles) west of Baghdad.