Islamic State (IS) militants have seized the main government building in Ramadi, the capital of Iraq's largest province.
As many as six suicide car bombs and mortars were used in the assault on the compound that houses the main police HQ and governor's office.
At least 50 police officers are reported to have been taken prisoner at the site.
IS and Iraqi troops have been battling for months to take control of the strategically important Anbar province.
This latest attack comes a day after Islamic State put out an audio message it claimed was from its leader, Abu Bakr al-Baghdadi, who Iraq had said was seriously wounded in a coalition air strike in March.
IS militants launched their raid on Ramadi overnight, driving suicide car bombs into the compound housing a number of government buildings.
At least 10 police officers were killed and dozens of others wounded in the attack, officials said.
Fighting continued into Friday and by 2pm (11pm NZST) the black flag of IS was seen flying over the complex.
IS "now occupies the government centre in Ramadi and has also raised its flag over the police HQ for Anbar", a police major told the AFP news agency.
The militant group itself issued a statement confirming it had taken control of the complex and said it had killed an unspecified number of pro-government fighters.
Fifty police officers are known to have been taken prisoner in the assault, but reports that they have been summarily executed are unconfirmed.
This latest assault is a blow for the Iraqi government which has been trying for more than a year to prevent Anbar and its key towns and cities from falling into the hands of IS.
The heavily-Sunni province of Anbar covers a vast stretch of the country west from the capital Baghdad to the Syrian border, and contains key highways that link Iraq to both Syria and Jordan.
Iraq's Prime Minister Haider al-Abadi pledged in April that his forces would "liberate" Anbar from IS after the success of re-taking Tikrit.
However, by Friday, the militant group had asserted its control over large areas of Ramadi and half of Anbar province, a BBC correspondent reported.
Meanwhile, in Syria, Islamic State militants are said to be getting close to the famous ancient ruins of Palmyra.
Syrian government forces and warplanes are trying to halt the advance of IS fighters towards the World Heritage Site.
Cultural officials fear that if IS makes it to Palmyra, they will destroy the historic ruins like they have at several other ancient sites in Iraq.
Troubled history of Anbar province