A member from the Iraqi security forces holds an Iraqi flag in the city of Ramadi. Reuters

Iraq's military flew the Iraqi flag above the central government complex in city of Ramadi, a military spokesman said on Monday, the morning after the army declared the city captured in its first major victory over Islamic State fighters.

"Yes, the city of Ramadi has been liberated. The Iraqi counter terrorism forces have raised the Iraqi flag over the government complex in Anbar", joint operations spokesman Brigadier General Yahya Rasool said in a statement broadcast on state television.

Victory in Ramadi, which was seized by Islamic State in May, is the first major triumph for Iraq's U.S.-trained army since it collapsed in the face of an assault by the hardline Sunni militants 18 months ago.

Ramadi, capital of mainly Sunni Muslim Anbar province in the Euphrates River valley west of Baghdad, had been Islamic State's biggest prize of 2015, seized in May.

Iraqi forces launched an assault on the city last week and made a final push to seize the central administration complex on Sunday. Their progress had been slowed by explosives planted in streets and booby-trapped buildings.

Security officials have said the forces still need to clear some pockets of insurgents in the city and its outskirts.

If the recapture of Ramadi is confirmed, it will be the first major city seized from Islamic State by Iraq's military, which in past battles against the militants had operated mainly in a supporting role alongside Iran-backed Shi'ite militias.

The militias were held back from the battlefield in Ramadi this time to avoid antagonizing the mainly Sunni population.

The government has said the next target after Ramadi will be the northern city of Mosul, by far the largest population center controlled by Islamic State in either Iraq or Syria.