Everyone was hoping it wouldn't come to this. ISIS militants have taken control of the strategic Iraqi city of Ramadi in Anbar province. With the Iraqi army in retreat and plans to arm Sunni tribesmen from the province in tatters, the Iraqi Government will now have to depend on thousands of Shiite militiamen to take back the key outpost.

But mobilisation of the Iranian-backed ­Shiite militias to try to wrest back the capital of Iraq's largest province from ISIS fighters raises the prospect of a major sectarian clash, and risks exposing a broader sectarian chasm in the country.

The fall of Ramadi and the dependence on Shiite militias now stationed outside the city represents a decisive failure of the American and Iraqi strategy to bolster Sunni partnerships in Iraq with the help of US air power.

The newly elected prime minister, Hadi al-Abadi, had pledged to bolster Sunni elements in the National Guard Forces and had promoted a plan to arm and train Sunni forces in the former al Qaeda stronghold of Anbar. He hoped to repeat the success of the Sunni Awakening councils that defeated the al Qaeda insurgency in 2008, this time against ISIS.

But the plan floundered. Shiite and Kurdish groups within the Government opposed the formation of the National Guard forces, wary of potential tribal allegiances with ISIS. Years of Shiite oppression of the Sunni in Iraq under former Shiite Prime Minister Nouri Al-Maliki have dealt a blow to the credibility of Sunni forces who cooperated with the Government, and prompted many of them to join the ISIS in what is perceived as a battle against their Shiite adversaries.

Elsewhere, Iraqi forces, backed by Shiite militias including the Badr Organisation and Asa'ib Ahl al-Haq, as well as US air cover, proved critical in the recapture the cities of Nineveh, Diyala and Tikrit from the ISIS. But allegations of sectarian-fueled reprisal attacks and human-rights abuses against Sunni populations by the militias followed in their wake. As the battle moved into the Sunni heartland of Anbar, there were fears Shiite militants might exact their sectarian agenda in the province, hardening Sunni sympathies for ISIS and contributing to a belief that the Government and the army are unable and unwilling to protect the Sunni minority.

In Ramadi and elsewhere it has taken control, ISIS has executed those it believes have sided with what it describes as the apostate regime; many of those Sunni elements in Ramadi who sided with the Government have either been killed or have switched their allegiance to ISIS.

Less than two weeks ago, media reports cited Sunni tribesmen pledging to unite in the fight against 'ISIS rats' and calling for swifter support from the Government to do so. They say their calls fell on deaf ears. When Iraq's undersupplied and poorly managed security forces collapsed on Sunday, Abadi called for the Shiite militias to join the battle. Videos surfaced (see above) of the army making a hasty withdrawal from the city on Sunday from a battle that left an estimated 500 people dead and forced some 25,00 people to flee the city of roughly 1 million.

By Monday, thousands of Shiite militiamen massed outside Ramadi in preparation for the battle to rout an ISIS advance east towards Baghdad. Iran swiftly offered to assist in the battle, adding to growing unease that the calamity in the country is pushing Iraq further into its orbit. The US, engaged in delicate peace talks with Iran over its nuclear program, is now in the awkward position of giving air cover to Iranian proxies in the country, despite their historic enmity.

On Monday, Pentagon spokesman Colonel Steve Warren told reporters that the militias have a part to play in the fight for Ramadi. 'As long as they are controlled by the central Iraqi government, then they will participate,' he said, adding that the geography of the city 'limits the ability of airpower'.

Whether Abadi can control the militias remains to be seen. His track record has not won the trust of Sunni parliamentarians so far. If he fails to rein in the militias in Ramadi, the credibility of his leadership will look even more tenuous.