By Stephen Kalin and Ahmed Rasheed
FALLUJA, Iraq (Reuters) - Iraqi forces on Sunday recaptured the last district of Falluja held by Islamic State militants and the commander of the operation declared the battle over following a month of fighting.
Iraqi troops reached the city center, an hour's drive west of Baghdad, last week but militants had holed up in some parts, including Golan district which the military retook on Sunday.
The assault is part of a wider offensive against Islamic State, which seized swathes of territory in 2014 but is now being driven back by an array of forces backed by a U.S.-led coalition.
Gains in Falluja give fresh momentum to the campaign to retake Mosul, the largest city anywhere in the jihadists' self-proclaimed caliphate spanning Iraq and Syria.
“As we promised you, today this flag is flying high in Falluja and, God willing, it will soon fly in Mosul,” said Prime Minister Haider al-Abadi, wearing a black military uniform and waving the Iraqi tricolour in front of the main hospital.
Swift advances in Falluja surprised many who expected a drawn-out battle for the bastion of Sunni Muslim insurgency, where some of the toughest fighting of the U.S. occupation took place in 2004 against Islamic State's al Qaeda forerunner.
Lieutenant General Abdul Wahab al-Saidi, who was in charge of the operation, told state TV at least 1,800 militants had been killed and the rest had fled or been captured. Some were still holding out in buildings, he said.
The U.S.-led coalition continued to provide air strikes and intelligence support in Falluja, a spokesman said.
Iraqi officers said air strikes had killed most of the insurgents ahead of ground advances to clear out remnants. Aerial bombardment also dug craters into main streets to prevent militants from slipping between neighborhoods.
Insurgents in Falluja, the first Iraqi city to fall to Islamic State in January 2014, had put up limited resistance and folded after some commanders abandoned the fight, military officials said.
Defence Minister Khalid al-Obeidi said on Twitter around 90 percent of Falluja remained "safe and habitable", comparing that favorably with Ramadi and Sinjar, cities recaptured from Islamic State last year but badly damaged in the process.
Parts of Falluja, especially a southern frontline that was mostly static for around two years, have been severely scarred by air strikes, artillery fire and Islamic State mines.
Many buildings are pancaked or damaged beyond repair; others, like a stadium near the city center that partially collapsed, less so. Dozens of homes were set ablaze but remain standing.
Trenches and earthen berms bisect many of Falluja's main arteries. Debris from weeks of clashes -- rubble, bullet casings, discarded water bottles -- are strewn across roads and piled more than a meter high on either side.
Iraqi forces are now dismantling bombs and booby-trapped houses, whilst pursuing militants who slipped out of the city from the northwest, Sabah al-Numani, a spokesman for the counter-terrorism forces that spearheaded the offensive, told Reuters.
Combat units mortared Islamic State positions in a western outskirt on Sunday afternoon as the thunder of controlled detonations echoed across the city.
Counter-terrorism forces and local police tasked with keeping Islamic State out after military units leave refrained from entering most buildings to avoid improvised mines.
Fighting to recapture Falluja forced the remaining 85,000 residents to flee over the past month, overwhelming government-run camps. The population was more than three times that size before Islamic State's takeover.
The mayor of Falluja told Reuters that displaced families could return within two months if the government and intentional agencies provided assistance.
"The city doesn't just require a rebuilding of its infrastructure but also serious rehabilitation of its society," said Essa al-Esawi.
"We need serious programmes from the international community to help people get rid of (Islamic State's) deviant ideologies and restore their normal life."
But an aid group said it was too early to speak of returns.
"We just do not know which areas are safe and which aren't," said Nasr Muflahi of the Norwegian Refugee Council. "We are not in a position to ensure people will get basic supplies and services in Falluja."
The United Nations says it has received allegations of abuse of civilians fleeing the city, including by members of Shi'ite armed groups supporting the offensive under the umbrella of Popular Mobilisation Forces (PMF).
Fearing they would enflame sectarian tensions in the mostly Sunni city, PMF that fought in outlying areas were largely sidelined during the main push into central Falluja. But some units appeared near the frontlines at the weekend and a top commander visited the battlefield on Saturday.
Two fighters wearing military fatigues who were patrolling a northwestern district on Sunday said they belonged to Badr Organisation, one of the most powerful Shi'ite factions, while counter-terrorism forces detained three PMF fighters on allegations of vandalism and arson.
(Additional reporting by Isabel Coles in Erbil; Editing by Raissa Kasolowsky and Stephen Powell)