IRAQI forces took the Islamic State group’s last positions in the city of Fallujah, establishing full control over one of the jihadists’ most emblematic bastions after a month-long operation.

Prime Minister Haider al-Abadi had already declared victory on June 17 after IS defences collapsed, with Iraqi forces facing only limited resistance in subsequent clearing operations.

The offensive saw tens of thousands of civilians risk death to flee their homes, leaving Iraq to grapple with a humanitarian crisis as its forces prepare to attack the country’s last remaining major IS hub of Mosul.

“This is joy for all Iraqis and it’s the right of all Iraqi people to celebrate the retaking of Fallujah,” Abadi said, speaking to Iraqiya state television outside Fallujah hospital.

Victory for the security forces in Fallujah came when elite forces retook Jolan, a northwestern neighbourhood of Fallujah where the last IS fighters in the city were believed to be holed up.

“It did not take more than two hours for CTS to retake Jolan,” said Sabah al-Noman, spokesman for the elite counter-terrorism service that has been leading the fight.

“Daesh did not fire a single bullet,” he said, using an Arabic acronym for IS. “This proves that Daesh was defeated even before our forces got there.” Several other senior military commanders said only small pockets of IS fighters remained in the Fallujah area.

After a gruelling month-long campaign, fighters rejoiced at the liberation of what was the first Iraqi city to fall out of government control two and half years ago.

“Today, I am... very happy,” said Mohammed Abed, a major with the joint rapid response force and a Fallujah native. “Fallujah is very beautiful... It is very unfortunate what happened to Fallujah.”

The offensive began on May 22-23 with an initial phase of staging operations aimed at tightening a months-old siege on Fallujah and led by the Hashed al-Shaabi, a paramilitary organisation dominated by Tehran-backed Shiite militias.

Qassem Suleimani, the powerful head of Iran’s elite Revolutionary Guards’ overseas operations arm, was more visible than ever before in Iraq during the early days of the operation.

The US-led coalition offered some aerial support but was less involved than six months ago during the operations to retake Ramadi, the capital of Anbar province in which Fallujah is also located.

The US had favoured focusing the battle on Mosul, the country’s second city, where IS proclaimed a “caliphate” straddling Iraq and Syria two years ago almost to the day.

Wearing a scarf with the national colours around his neck in Fallujah Sunday, Abadi vowed: “We will raise the Iraqi flag in Mosul soon.” While some pockets of IS fighters on the outskirts of Fallujah remain to be flushed out, the jihadist organisation does not appear in a position to contest the area any longer.

The loss of Fallujah, which looms large in jihadist mythology and in 2004 saw US forces suffer some of their worst losses since the Vietnam War, is a blow to IS.

“The biggest victory achieved so far in the battle against Daesh is the battle of Fallujah,” Hadi al-Ameri, a key Hashed al-Shaabi commander, told AFP there.

The jihadist organisation has lost several key leaders in air strikes, more than two thirds of the territory it controlled in Iraq two years ago and it faces multiple offensives in Syria.

Facing a seemingly inexorable decline of its de facto state, IS had reverted to old tactics and recently ramped up bombings against key infrastructure and civilian targets.

But few major attacks have been reported in Baghdad since the start of the Muslim fasting month of Ramadan.