The loss of the city of Ramadi in Iraq's restive Anbar province has been widely perceived as a failure of US policy in Iraq. While high-ranking US officials have tried to deflect the blame onto Iraqi forces, America's confused and half-hearted strategy against the Islamic State (IS) group has come into sharp relief. By contrast, Iran's parallel campaign against IS has received a shot in the arm, as evidenced by the entry of Shia-led militias into the Anbar arena. Indeed, in Iraq the failure of the American and British-trained army is by definition a victory for Iran, which has quietly developed an effective fighting force in the form of militias and special groups. By all credible accounts, Iran is escalating its involvement in Iraq by attempting to fuse the disparate militias into a single cohesive force. This speaks to a long-term strategy of developing a parallel state in Iraq and propelling influence-building to its maximum. But the existence of a clear and clever Iraq strategy does not necessarily imply complete unity of purpose or motivation in Tehran. Indeed, competing forces and interests have different visions of the desired outcome. Iran's long-term success in Iraq depends on the extent to which these forces can work together to mitigate costs and maximise gains. Iraq's vast Anbar province is often portrayed as the bastion of Arab Sunni identity and the resulting resistance to the Shia-led administration in Baghdad. The province has been deeply and continuously mired in unrest since the Anglo-American invasion of Iraq in March-April 2003. What is less well known about Anbar is its place in the historical Iranian imagination. The word “Anbar” is in fact a Persian one, roughly translatable as “warehouse,” the function the area served under the Sassanid Dynasty, the last pre-Islamic Iranian empire. Ancient, classical and pre-modern Iranian strategists viewed control of this area as vital to projecting the country's power further west with a view to establishing a secure base on the eastern banks of the Mediterranean. In modern times, Iran has been able to establish a secure presence on the Mediterranean coast without controlling Anbar, courtesy of the Islamic Republic's alliance with Syria and the Shia community in southern Lebanon. But the prospect of emasculating Anbar must be appealing to the Iranians, not least because of the central role of this province in the long-running Iran-Iraq War of the 1980s. Many of the most capable Iraqi army officers, in addition to the most effective and loyal intelligence operatives, originally hailed from this region. Anbar continues to be a hotbed of anti-Iranian feeling, and by extension it harbours an intense loathing of the Shia-led government in Baghdad, making it fertile ground for the growth of IS and its allies. The Iraqi government has framed the “liberation” of Anbar as the centrepiece of its strategy against IS and its extensive network of local tribal and sub-tribal allies. Even if Ramadi is captured quickly, however, driving IS out of Anbar is likely to take years. The long campaign in Anbar has spurred Iran and its most loyal allies in Baghdad to step up the re-organisation of the Shia-led militias. Until only recently, an assortment of relatively large organisations and smaller groups, some of them poorly led and organised, has dominated the militia landscape. The formal creation of an umbrella body, the so-called Popular Mobilisation Units, Al-Hashd Al-Shaabi (PMU), in June 2014 was the first step in the creation of a pan-militia organisation. This was a direct response to the sweeping gains made by IS last June and reflected widespread concerns at the highest levels of Iraq's Shia community on the inability of the army and other national security forces to contain the IS threat. A LONG GAME: Notwithstanding the formal creation of the PMU, the militias have tended to act more or less independently, with little effective coordination with the Iraqi army. This confusing state of affairs was brought into sharp relief in March-April this year during the campaign to recapture Tikrit. Iran has high ambitions for the PMU, as evidenced by the close nurturing of this embryonic entity by none other than Qasem Suleimani, the charismatic commander of the Iranian Al-Quds Force, the expeditionary wing of the Islamic Revolutionary Guards Corps (IRGC). Suleimani and the IRGC likely aspire to create a force in Iraq akin to the Iranian Basij. Created in 1979, the latter is a popular mobilisation force and acts as the paramilitary arm of the IRGC. Whilst the Basij has performed useful paramilitary and social policing roles in Iran, in neighbouring Iraq, owing to the weak government institutions, a similar organisation could turn into a parallel state. This development would answer to deep and careful strategising in Tehran, where, broadly speaking, there are three actors and schools of thought on Iraq. The Foreign Ministry and its allies (composed of think tanks and university departments) is a solid repository of Iraq-related expertise. The dominant view in these circles is to build up a sufficient level of influence in Iraq with a view to creating lasting strategic depth. Meanwhile, a second actor, the IRGC, conducts on-the-ground influence-building operations in Iraq, primarily through its expeditionary Al-Quds Force. The IRGC approach, whilst also strategic, tends to view Iraq through an ideological lens, notably as an arena of conflict with the US and to a much lesser extent with Saudi Arabia and the Gulf states. The third actor is comprised of an outlook, as opposed to an institution, that is rooted in Iranian nationalism. This outlook was expressed in clear terms in March by former intelligence minister Ali Younesi, who claimed that Baghdad was now effectively Iran's capital. According to this school of thought, Iraq not only represents Iran's strategic depth, but is also a historical extension of the country. While elements sympathetic to this outlook maintain a presence inside the two main institutional actors (the Foreign Ministry and the IRGC), they are not currently in a position to decisively influence policy. This dense institutional and ideological environment underpins the Islamic Republic's deep commitments in Iraq, which are likely to unfold over several decades. It remains to be seen whether Iranian policy-makers and strategists succeed in optimally managing their institutional and ideological differences in the face of the escalating challenges in a fragmenting Iraq. The writer is an analyst of Iranian politics and director of the research group Dysart Consulting.