Iraqi security forces said on Sunday they had defeated Islamic State fighters in the city of Ramadi, after taking control of a government complex that was the militants' last stronghold in the city.

Forces began storming the center of the city, a provincial capital just two hours' drive west of Baghdad, this week to try to dislodge Islamic State militants who had been holding Ramadi since May. Joint operations command spokesman Yahya Rasool told Reuters earlier that Iraqi forces had totally encircled the government complex in Ramadi, "clearing the buildings and streets around the complex of bombs in preparation to go in."

"By controlling the complex this means that they have been defeated in Ramadi," Sabah al-Numani, a spokesman for the force leading the fight on the government side, told Reuters. "The next step is to clear pockets that could exist here or there in the city."

"The complex is under our complete control, there is no presence whatsoever of Daesh fighters in the complex," he added, using an Arabic acronym for the Islamic State, also known as ISIS or IS.

State television broadcast footage of troops, Humvee vehicles and tanks advancing through Ramadi streets amid piles of rubble and collapsed houses. Some districts appeared to have been completely destroyed by the advance, which was supported by US-led coalition airstrikes.

Television also showed nighttime celebrations in mainly Shi'ite cities south of Baghdad for the victory in majority-Sunni Anbar, with people dancing in the streets and waving Iraqi flags from cars.

Soldiers advanced overnight on Saturday in the Hoz neighbourhood that houses the provincial government compound. Special operation commander Sami al-Aridhi had said the plan was "to liberate all of Ramadi from three sides."

Most remaining civilians in the IS-held central district had taken shelter in the city's hospital, knowing that the army would not target it, Rasool said. About 120 families were rescued from the combat zone on Saturday after securing safe routes for their exit and they were taken to a camp near Habbaniya, north of Ramadi, according to a military statement broadcast on state TV. Officials did not give any immediate death tolls for the battle. The government said most civilian residents of the city were able to evacuate before armed forces launched their assault.

If reports of the offensive's success are correct, Ramadi will become the second main Iraqi city to be retaken from IS after Tikrit was captured in April, making this one of the Iraqi military's most significant victories to date.

Officials said the complex would be handed over to the local police and to a Sunni tribal force once secured.

Watch the VICE News documentary **Under Siege in Ramadi:**

After Ramadi, the army plans to move to retake the northern city of Mosul, the biggest population center under IS control in Iraq and Syria. Dislodging the militants from Mosul, which had a pre-war population close to 2 million, would effectively cripple their state-like structure in Iraq and deprive them of a major source of funding, which comes partly from oil and partly from fees and taxes on residents.

Shi'ite militias backed by Iran, which have played a major role in the Tikrit offensive against IS, have been kept away by the Iraqi government from the battlefield in Ramadi to avoid sectarian tensions.