Iraq's Prime Minister Haider al-Abadi says Iraqi forces have retaken most of Fallujah from the Islamic State of Iraq and the Levant (ISIL), as clearing operations are under way to flush out the armed group's remaining fighters in the city.

The government lost control of Fallujah in 2014, months before ISIL, also known as ISIS, took Iraq's second largest city, Mosul, and swept across large parts of the country.

"We promised you the liberation of Fallujah and we retook it. Our security forces control the city except for small pockets that need to be cleared within the coming hours," Abadi said on Friday in a brief address on state TV.

"Fallujah has returned to the nation and Mosul is the next battle," Abadi also said on Twitter. "Daesh will be defeated," he added, using an Arabic acronym for ISIL.

PM Al-Abadi: Fallujah has returned to the nation and Mosul is the next battle, Daesh will be defeated pic.twitter.com/rNhHKMfYfF — Haider Al-Abadi (@HaiderAlAbadi) June 17, 2016

Earlier on Friday, Iraqi forces said they had entered the centre of Fallujah, nearly four weeks after the start of a US-backed offensive to retake the city 50km west of the capital, Baghdad.

"The counterterrorism service and the rapid response forces have retaken the government compound in the centre of Fallujah," the operation's overall commander, Lieutenant-General Abdulwahab al-Saadi, told the AFP news agency.

The Iraqi flag is now raised on top of the building, symbolising government control.

Commanders said their forces had met limited resistance from ISIL fighters during the push into the city centre.

"This is a very significant development," said Al Jazeera's Omar Al Saleh, who has reported extensively on the conflict in Iraq.

"It is a big moral boost for Iraqi soldiers."

Matthew Henman, from the Jane's Terrorism and Insurgency Centre, said that even with the "breakthrough", it would take "much longer" to completely get rid of ISIL in Fallujah, and prevent future attacks.

He also said that if the fight over Fallujah wraps us quickly, then more troops would be realigned to help the government push against ISIL in Mosul.

Government troops and Shia units known as the Popular Mobilisation Forces are leading the campaign to retake the Sunni city from ISIL. They are supported by US-led coalition air strikes.

Al Jazeera's Saleh said the death toll from the fighting so far is based on estimates by medical sources from the city of Fallujah.

"They say it is in the hundreds," he said.

READ MORE: Militias 'take turns to torture' civilians in Fallujah

Although the Iraqi government previously said it had a particular strategy to establish safe corridors for civilians in the city centre to leave, many have been reluctant to go for fear of how they may be treated by the Shia units.

Thousands have fled the city and its surrounding areas since the military offensive was launched on May 23, but the UN said that tens of thousands are still inside the city - last week, the UN said up to 90,000 people were believed to be inside Fallujah, in a significant revision of a previous estimate of 50,000.

Many escaping the fighting have been detained and kept at detention facilities, with reports of abuse and violations by government forces and Shia fighters.

The UN says detention facilities lack basic services, including medicine and food.

The humanitarian crisis in Iraq has been dubbed one of the world's worst by the UN.

Since the beginning of the present conflict in 2014, more than 3.4 million people have been internally displaced and 2.6 million have fled Iraq.