When Islamic State militants retreated from the embattled town of Jurf al-Sakher last week, the Iraqi military was quick to flaunt a rare victory against the extremist group, with state television showing tanks and Humvees parading through the town and soldiers touring government buildings that had been occupied by the militants since August.
However, photos soon emerged on independent Iraqi news websites revealing a more discrete presence - the powerful Iranian general Ghasem Soleimani - whose name has become synonymous with the handful of victories attributed to Iraqi ground forces. Local commanders said Lebanon's powerful Shiite Hezbollah group was also on the front lines.
Shiite militias have played a key role in driving the Islamic State group out of the so-called Baghdad Belt of Sunni villages ringing the capital. But the sectarian militias have long been implicated in brutality against the country's Sunnis, and while they have benefited from US-led airstrikes, their advance could undermine efforts to knit the troubled country together.
Militia commanders told The Associated Press that dozens of advisers from the Iranian Revolutionary Guard and the Lebanese Hezbollah were on the front lines in Jurf al-Sakher, providing weapons training to some 7,000 troops and militia fighters, and coordinating with military commanders ahead of the operation.
One commander, who agreed only to be identified by his nickname, Abu Zeinab, said Soleimani began planning the Jurf al-Sakher operation three months ago. The cleared town, 50 kilometers (30 miles) south of the capital, lies on a road often used by Shite pilgrims, who will be heading in droves to the holy city of Karbala this week to commemorate the death of the Prophet Muhammad's grandson, Imam Hussein, in a 7th century battle that marked the beginning of the Sunni-Shiite divide.
Iraqi military officials declined to discuss Soleimani's presence in Jurf al-Sakher, or in previous victories where he is known to have played a commanding role, including in the besieged town of Amirli in August and in the Shiite holy city of Samarra in June.
Hezbollah has openly joined Syrian President Bashar Assad's forces against the mainly Sunni militants fighting to topple him - a decision that has fueled sectarian tensions in Lebanon. The Iran-backed group, however, has not commented on its involvement or lack thereof in Iraq. In Beirut, Hezbollah officials were not available for comment and did not return calls from The Associated Press to discuss the matter Tuesday.
In July, officials in Lebanon said a Hezbollah commander was killed while on a "jihadi mission" in Iraq. Ibrahim Mohammed al-Haj was buried in Lebanon and his funeral attended by top Hezbollah officials. It was the first known Hezbollah death in Iraq since the Islamic State group's lightning advance in June.
Iraqi officials have said that a handful of advisers from Hezbollah are offering front-line guidance to Iraqi Shiite militias fighting the Sunni extremists north of Baghdad. But it is not known if any Hezbollah men are actually fighting.
The US and Iran have found themselves on the same side in the war against the Islamic State group, which rampaged across much of northern and western Iraq in June, seizing the country's second-largest city, Mosul. But while U.S. military advisers have been coordinating coalition airstrikes from within heavily fortified bases, Soleimani and his commanders are on the front lines and would assume a key role in the retaking of major cities.
That could prove a major impediment to addressing the grievances of Iraq's Sunni minority. The militias were implicated in the mass killing of Sunnis at the height of the country's sectarian carnage in 2006 and 2007 and have more recently been accused of brutalizing Sunni captives.
Sunnis are also deeply suspicious of Shiite powerhouse Iran, which has played an outsized role in Iraqi affairs since the 2003 US-led invasion that toppled Saddam Hussein's Sunni-dominated government.
"It is true that Iraq needs any kind of help in the current situation, but this help should be public and part of the international efforts," Sunni lawmaker Hamid al-Mutlaq told the AP. "This undeclared Iranian help harms national reconciliation and the sovereignty of Iraq."
Amnesty International said last month that Shiite militias have abducted and killed scores of Sunni civilians with the tacit support of the government in retaliation for Islamic State attacks.
Iraq's Prime Minister Haider al-Abadi has pledged to reign in the Shiite militias and establish a national guard to mobilize Sunnis against the extremists. But it could take months to assemble such a force, and in the meantime Soleimani's militias are the best placed to aid Iraq's beleaguered military in regaining the initiative against the Islamic State group.
Soleimani's Quds Force, the special operations arm of Iran's Revolutionary Guard, has been involved for years in training and financing Iraq's Shiite militias. It has also long worked with Hezbollah in Lebanon and has been aiding Assad's forces.
In June, Revolutionary Guard advisers under Soleimani provided guidance for Shiite militiamen in shelling Sunni insurgent positions around Samarra, a Sunni-majority city north of Baghdad that is home to a revered Shiite shrine, local commanders said. Soleimani was also seen as playing a key role in relieving the Islamic State siege of the Shiite Turkmen town of Amirli. And a top Revolutionary Guard general said in September that Soleimani had even helped Kurdish fighters defend their regional capital Irbil.
Militia commanders, who spoke on condition of anonymity because they are not authorized to talk to the media, describe Soleimani as "fearless" - one pointing out that the Iranian general never wears a flak jacket, even on the front lines.
"Soleimani has taught us that death is the beginning of life, not the end of life," one militia commander said.