What is Iran's game plan in Iraq?
In the Iraqi city of Najaf, the streets are plastered with posters commemorating the anniversary of the death of Ayatollah Khomeini, the founder of Iran's revolution.
At a public funeral for fighters from a local militia, a portrait of Iran's current leader, Ayatollah Khamenei, is carried high.
In Iraq today, there are reminders everywhere of how Iran's influence has grown since Tehran moved in to join the fight against so-called Islamic State (IS).
The seizure of Iraq's second city, Mosul, by IS fighters one year ago was as much of a shock to Iran's Shia leaders as it was to many Iraqis.
The prospect that a friendly neighbour and ally, ruled by fellow Shia politicians, could be replaced by an extremist Sunni regime prompted Tehran into swift action.
For Iran, Iraq was also home to Shia Islam's holiest shrines and a land bridge to another key Arab ally, Syria.
Within days, Iran's shadowy revolutionary guard commander, Qasem Soleimani, had arrived in Baghdad to help defend the capital.
He embarked on quiet rounds of talks to encourage pro-Iranian Shia clerics to put aside their differences and resurrect the militias they had been forced to disband.
Gen Soleimani hoped with arms and support from Iran, they would take the lead in keeping Iraq together.
He was inadvertently helped in his quest by a fatwa from Iraq's highest-ranking Shia cleric, Ayatollah Ali Sistani.
The ayatollah called on all able-bodied young men to take up arms to defend Iraq.
The fatwa gave legitimacy and impetus to the drive to recruit men for the militias.
In Baghdad and throughout the south, tens of thousands rushed to volunteer.
Gen Soleimani ensured that small arms and funds were swiftly delivered to the militias.
Iran also sent weapons to the Iraqi army and to the Kurds fighting a desperate battle against IS in the north.
Officials in both the Kurdish capital, Irbil, and Baghdad are open about how instrumental these rapid weapons supplies were to fighting power and morale.
They point out that the US at this time was still vacillating and even attaching conditions to its own weapons supply plans.
Iran also encouraged the Iraqi government to lend army officers and hardware to the militias.
Soon Iraqi army tanks were rolling north from Baghdad, driven by militiamen waving green Shia flags and pictures of Iran's Ayatollah Khamenei.
Iran also deployed revolutionary guard officers, veterans of the 1980s Iran-Iraq war, to train and advise the militias.
Having bolstered Iraq's military capacities, Iran now turned to the political crisis brewing in Baghdad.
In August, Iran finally backed plans to replace Prime Minister Nouri al-Maleki.
He resigned, opening the way for a new government more representative of Sunnis and Kurds - something the US, many Iraqis and even Ayatollah Sistani had been pushing for.
Shia holy sites in Iraq:
- Imam Ali Mosque, Najaf: Contains the tomb of the first Shia imam
- Imam Husayn Shrine, Karbala: Contains the tomb of Hussein ibn Ali, son of Imam Ali and third Shia imam, who was killed at the Battle of Karbala in AD648
- Al Abbas Mosque, Karbala: Contains the tomb of Al-Abbas ibn Ali, Hussein's half-brother, who also died at the Battle of Karbala
- Great Mosque of Kufa: The place where Imam Ali was attacked and killed while at prayer
- Awlad Muslim Mosque, Musayyib: Tomb of the sons of the warrior Muslim ibn Aqeel
Meanwhile, the US and its allies had formed a coalition to carry out air strikes against IS.
Although Iran was not included, it was another check on IS's room for manoeuvre.
The US strategy relied on local ground forces - the Kurds and the Iraqi army - but not the Shia militias. US military leaders said they did not want coalition aircraft to become "the air force for the revolutionary guard".
But in due course that's in effect what happened.
On a few occasions, Iranian fighter jets reportedly flew over Iraq to support the militias when US and coalition aircraft would not get involved.
With each month, Iran sponsored and bankrolled more clerics and pro-Iranian figures to establish their own militias, furthering Iranian influence on the ground.
These well-equipped militias have launched a big PR campaign across Iraq, with billboards, posters and social-media accounts showcasing their military power, their martyrs and the Iranian leader.
One year on, there are now dozens of pro-Iran Shia militia groups spreading Iran's brand of militancy and leading the fight against IS.
Many have now been placed under an umbrella organisation - the Popular Mobilisation, under the nominal control of Prime Minister Haider al-Abadi.
The force commander, Hadi Al-Ameri, says three things helped keep Iraq together:
- Ayatollah Sistani's fatwa
- people's response to it
- Iran's rush to help
The militias have succeeded in driving IS back in the north and in the east, and now the government has called on them to lead the fight to retake Iraq's third largest city, Ramadi, which fell to IS in May.
The Americans, frustrated by the ineffectiveness of the Iraqi army, seem to have now accepted the leading role of the militias, as long as they remain under government command.
Meanwhile in the south, Shia militias have helped spread Iran's influence even in the holy cities of Karbala and Najaf - until last year the sphere of influence of moderate Ayatollah Sistani.
Unlike Iran's Ayatollah Khamenei, Ayatollah Sistani does not believe in a role for the clergy in government.
But dozens of charitable organisations set up by Iran and linked to the militias seem to be challenging his authority by publicly backing Ayatollah Khamenei.
Some observers in Najaf now think the Iranians are waiting for the 85-year-old Ayatollah Sistani to die before moving in fully to claim the religious guardianship of the holy cities.
But there are signs Iran is becoming increasingly mired in a conflict it can ill afford to fight.
Iran is now arming and funding an army of close to 100,000 militiamen.
It is a burden for a country struggling under international sanctions.
Iran is receiving an increasing number of body bags, as military advisers and officers die on the battlefield. Dozens are thought to have been killed already.
But Revolutionary guard commanders keep telling Iranians if they don't take the fight to Iraq or Syria, the war will come to Iran.