Iraqi security forces are driving out Isis fighters from the government compound in the centre of Fallujah, the city 40 miles west of Baghdad which Isis has held for two-and-a-half years.

Heavily armed Interior Ministry police units say they raised the Iraqi flag over the main government buildings on Friday, including the police station and court houses, in the latest stage of an attack that began on 23 May.

Clouds of smoke were rising from the centre of Fallujah as it was hit by airstrikes and artillery fire, while Isis snipers in the General Teaching Hospital tried to pick off advancing government troops.

After a week of heavy fighting on the outskirts of the city, a government spokesman said that Isis resistance had weakened. The offensive is led by elite federal police and Counter-Terrorism Service troops advancing along Baghdad Street that bisects the city, which had a population of 300,000 before it was seized by Isis in January 2014. The number of the government forces has been put at 20,000, the majority of whom belonging to the Shia paramilitary Popular Mobilisation Units (Hashd al-Shaabi).

Some 90,000 civilians remained in the city at the start of the present assault, of whom 68,000 have fled, many of them over the past twenty-four hours since Isis reversed its previous policy of forbidding anybody to leave on pain of death.

Iraqi forces ‘make gains’ in Fallujah offensive

Witnesses say that Isis was announcing by loudspeakers that everybody could leave, leading 6,000 families to depart on Thursday alone. Two bridges over the Euphrates River were opened, allowing people to get away from the city centre.

But displacement camps have been overwhelmed. The former mayor of Fallujah before the Isis takeover, Issa al-Issawi, who now resides outside the city said: “We don’t know how to deal with this large number of civilians.”

Iraqi forces vehicles drive past damaged buildings in Fallujah's southern Hayakel neighbourhood

The exodus of people from the city was also enabled by Isis fighters suddenly retreating from important checkpoints inside Fallujah witnesses told the Norwegian Refugee Council.

The nature of this retreat is important because it could mean that Isis leaders have decided not to risk suffering devastating casualties among their experienced fighters by resisting to the last man in the face of an attack backed by US-led airstrikes which was bound to win in the end.

In pictures: Iraq battles to drive Isis out of Fallujah Show all 12 1 /12 In pictures: Iraq battles to drive Isis out of Fallujah In pictures: Iraq battles to drive Isis out of Fallujah Smoke rises after airstrikes by US-led coalition planes as Iraqi security forces advance against Islamic State extremists in Fallujah, June 15, 2016 AP In pictures: Iraq battles to drive Isis out of Fallujah Iraqi security forces advance during heavy fighting against Isis militants in Fallujah, Iraq, on 14 June AP In pictures: Iraq battles to drive Isis out of Fallujah Shia militia say that moving resources from Fallujah towards the area near Mosul was a 'betrayal' of the battle for the city GETTY In pictures: Iraq battles to drive Isis out of Fallujah Hospital sources said 18 bodies were recovered from the river over the weekend AP In pictures: Iraq battles to drive Isis out of Fallujah Up to 60,000 civilians were feared trapped in Fallujah at the start of the Iraqi operation AP In pictures: Iraq battles to drive Isis out of Fallujah Shia fighters hold an Isis flag in an operation east of Fallujah – the terror group has lost ground in both Syria and Iraq AFP/Getty In pictures: Iraq battles to drive Isis out of Fallujah Shia fighters hold their weapons as they gather near Falluja, Iraq, June 4, 2016. Reuters In pictures: Iraq battles to drive Isis out of Fallujah Pro-government forces bid to take back ground from Isis in Fallujah MOADH AL-DULAIMI/AFP/Getty Images In pictures: Iraq battles to drive Isis out of Fallujah Smoke billows on the horizon as Iraqi military forces prepare for an offensive to retake the city AP In pictures: Iraq battles to drive Isis out of Fallujah A member of the Iraqi security forces fires artillery during clashes with Isis militants near Fallujah, Iraq, 29 May, 2016 Reuters In pictures: Iraq battles to drive Isis out of Fallujah Iraqi government forces fire a rocket near al-Sejar village, north-east of Fallujah, on May 26, 2016, as they take part in a major assault to retake the city from the Islamic State group AFP/Getty In pictures: Iraq battles to drive Isis out of Fallujah Shia fighters and Iraqi security forces advance towards Fallujah Thaier Al-Sudani/Reuters

Isis pursued similar tactics in Ramadi, Sinjar and Tikrit of using snipers, mines and booby traps but fading away at the last minute, often using elaborate networks of tunnels in which to hide and later escape.

Nevertheless, the capture Fallujah by Iraqi government forces, though still continuing and incomplete, is the most serious defeat suffered by Isis in Iraq. Its loss is so significant because the city is close to Baghdad and it has an historic significance for Sunni Arabs as a place always sympathetic to fundamentalist Islam which resisted the US in two famous sieges in 2004.

The Sunni Arabs make up a fifth of Iraq’s 33 million population and their whole community is under pressure as their population centres are captured by the Iraqi security forces and Shia paramilitaries. Many people who once lived in Fallujah have fled to Iraqi Kurdistan because they cannot take refuge in Shia-dominated Baghdad where Shia often suspect displaced Sunni civilians of being Isis infiltrators. Men of all ages leaving Fallujah were being detained on Friday amid claims that some had been murdered and tortured earlier in the week by Shia paramilitaries.

It is unclear how badly Fallujah has been damaged by airstrikes and shellfire, but Ramadi, the capital of Anbar province, was 70 per cent destroyed by artillery and bombing in the second half of last year at the end of which it was recaptured. Most of its population has yet to go home. Human Rights organisations report that men from the city were confined in conditions so cramped that they could not lie down for days at a time.