Tribal fighters deployed in Ramadi Tuesday, a step towards providing the reconquered Iraqi city with a force both capable of preventing the jihadists' return and palatable to the local population.
Hundreds of fighters from local Sunni tribes, with the assistance of the army, took over security duties from elite counter-terrorism forces.
"Five hundred members of the tribes from the Hashed arrived in northern Ramadi to participate in operations there and hold the liberated areas," said Major General Ismail Mahalawi, who heads Anbar operations command.
The Hashed al-Shaabi (Popular Mobilisation) is an umbrella group dominated by Tehran-backed Shiite militias that have played a key role in retaking land from IS.
However, Sunni fighters from Anbar tribes opposed to the jihadists also officially belong to the group, which is nominally under Prime Minister Haider al-Abadi's command.
"Five units of tribal forces arrived today and hold the areas of Jaraishi, Zawiyah and Albu Faraj north of Ramadi," said their leader, Tareq Yusef al-Asal.
They have been trained on Habbaniyah base, east of Ramadi, and armed by the defence ministry, he added. The US-led coalition supported that process.
The premier visited the Anbar capital Tuesday, a day after the elite counter-terrorism service raised the Iraqi flag above the city's large government complex.
The provincial headquarters had been the epicentre of the fighting since Iraqi forces punched through IS defences a week ago to cap a months-long operation to retake Ramadi.
Abadi congratulated the security forces, who were still sweeping streets and buildings for roadside bombs, booby traps and holed up jihadists.
Signup to our newsletter and follow us on Facebook and Twitter!
- Lasting victory -
The most powerful groups in the Hashed al-Shaabi played only a peripheral role in the Ramadi battle, as Abadi and the US-led coalition wanted federal forces to regain confidence by spearheading the operation.
The loss of Ramadi to IS in May was a huge blow to Baghdad's war on the jihadists, and exposed the continued weakness of security forces that had nearly collapsed when IS swept through the country in 2014.
The recapture of Ramadi "is a real accomplishment but the keeping and governing of Ramadi will be a much bigger one for Iraq," said Patrick Skinner, an analyst with the Soufan Group risk intelligence consultancy.
"And it remains to be seen if the conditions that gave rise to IS -- violent sectarianism, horrible governance, corruption -- have changed enough to keep IS from simply sitting in the countryside and returning later," he said.
Abadi has promoted a big role for homegrown security forces in post-jihadist Ramadi in a bid to avoid any sectarian tensions and increase the chances that Sunnis will be convinced to work with the government and not with IS.
As elite forces gradually move out of Ramadi to prepare for battles elsewhere in Anbar province, in northern Salaheddin or in Nineveh, a credible local force needs to take over.
Some parts of the city will need to be almost entirely rebuilt but Abadi's government is cash-strapped and the challenge of preparing Ramadi for the return of its people is huge.
"The bigger the role of the Sunnis in governing and policing Ramadi, the more lasting this victory will be," said Firas Abi Ali, Middle East analyst with the IHS group.
"Conversely, a return to the sectarian politics that led to the Iraqi government attacking Ramadi protesters in 2013 would pave the way for the return of Islamic State," he said.