Qassem Suleimani, commander of the Quds force of the Iranian Revolutionary Guard Corps (IRGC), is a useful man to have on your side in a crisis. Nouri al-Maliki, Iraq's prime minister, must have been relieved to see him as he scrambled to organise a counterattack against the Sunni jihadis who have taken swathes of territory and were threatening Baghdad.
Suleimani is a regular, though usually unannounced, visitor to the Iraqi capital, where he has been a key player since even before the 2003 US invasion and the overthrow of Saddam Hussein. Stiffening resistance, mobilising militias and greasing palms is the stuff of a clandestine career which has given him the reputation of being one of the Middle East's most powerful and mysterious men.
His latest mission to Baghdad is being seen as an indication of the gravity of the Iraqi crisis - a client of Tehran facing extremist jihadis. "The IRGC will see this as another front, akin to what is happening in Syria," said Ali Ansari, a historian of Iran at the University of St Andrews. "They are taking it very seriously indeed."
In the past three years, Suleimani, as the point man in Iran's strategic backing for Bashar al-Assad and its ties to Hezbollah, the Lebanese Shia movement, has focused on Damascus.
US sanctions on him because of his role in Syria mean he is unlikely to meet any American officials - even if Washington and Tehran were to agree on short-term military cooperation in Iraq. Still, Suleimani was discreetly involved in negotiations with the US after the September 11 attacks, when Iran offered help to US forces in Afghanistan - until George W. Bush included Tehran in "the axis of evil".
Nowadays Iran's battle lines are clear. "Syria is the main bone of contention," Suleimani said in a rare speech in February. "On one side stands the whole world and on the other stands Iran. Some people urge Assad to go ... but they don't realise the truth."
Fiercely loyal to Ayatollah Ali Khamenei, Iran's supreme leader, Suleimani usually keeps a low profile at home, his pale, almost ghost-like face, deep-set eyes and greying hair on show only occasionally at the funerals of IRGC men killed in Syria. Khamenei once branded him "a living martyr" - high praise.
Suleimani, now 57, was in his early 20s when he joined Iran's forces in the war Saddam launched against the country in 1980 - a conflict that became last century's longest conventional war and which left more than a million dead on both sides in its eight bloody years. Afterwards he was deployed to Iran's eastern border, fighting drug smugglers from Afghanistan. In 1998, he was appointed commander of the Quds (Jerusalem) force.
Estimated to be several thousand strong, the Quds carries out a range of highly sensitive functions: intelligence, special operations, arms smuggling and political action - anything that constitutes protecting the revolution or attacking its enemies, Israel foremost among them. "It combines the functions of MI6, the SAS and DfID [Department for International Development]," a British official quipped. "It is Iran's long arm - everywhere."
Experts say it's hard to overestimate Suleimani's role in Iraq. "At times of crisis Suleimani is the supreme puppeteer," said Professor Toby Dodge of the London School of Economics. "He is almost like a Scarlet Pimpernel. He is everywhere and he's nowhere. He can be blamed for everything. Suleimani is doing in Baghdad what he did in Damascus - giving advice and help to an ally in trouble, Maliki in this case."
Suleimani has been a key figure, pulling strings and lubricating links with Iraqi politicians and militias, some with long experience in fighting US forces after the 2003 invasion. US think tank The Brookings Institution reported last weekend that Iran appeared to have committed three battalion-sized groups of Quds personnel to improve the performance of Iraqi units rather than fighting themselves.
Suleimani also manages Iranian ties with Hezbollah, vital in giving Assad the edge over the Syrian rebels. Now another important client, Maliki, is in serious trouble and Tehran is being forced to defend him and century-old national borders that are being eroded by violent jihadis.
In his profile of Suleimani for The New Yorker last year, Dexter Filkins recounted how the Quds chief used his connections in Iraq to play the Americans, Sunni terrorists, and Shiite proxy militias off of one other during America's military presence. He even visited Baghdad's Green Zone.
"Throughout the war, [Suleimani] summoned Iraqi leaders to Tehran to broker deals, usually intended to maximise Shiite power. At least once, he even travelled into the heart of American power in Baghdad," Filkins wrote. He quoted an Iraqi politician as saying: "Suleimani came into the Green Zone to meet the Iraqis. I think the Americans wanted to arrest him, but they figured they couldn't."
The Iranian's brash behaviour sometimes raises eyebrows: when he met Iraqi President Jalal Talabani in 2008, according to one source, it looked like a "master-client relationship".
The previous year, during a series of battles between the US and Iraqi army on one side and Shia militias on the other, he sent an SMS message to the US commander, General David Petraeus. It read: "General Petraeus, you should know that I, Qassem Suleimani, control policy for Iran with respect to Iraq, Lebanon, Gaza, and Afghanistan. The ambassador in Baghdad is a Quds force member. The individual who's going to replace him is a Quds force member."
Dodge says that one of Suleimani's most valued Iraqi assets is the Asaib Ahl al-Haq (the League of the Righteous), a Shia militia created by the Iranians to undermine the movement led by Muqtada al-Sadr, the Shia nationalist who emerged at the forefront of opposition to the US. Its leader, Qais al-Khazali, was one of the Iraqis Suleimani reportedly saw in Baghdad. "Like other Iranian-created structures, Asaib al-Haq is deeply religious and ideological and runs in parallel to the state, undermining it when it needs to and working with it when it doesn't," said Dodge.
The League of the Righteous staged some spectacular attacks against US troops. Another old Iranian-backed Iraqi player, the Badr brigade, which was supposed to have been disbanded, reappeared in public last week.
Suleimani's public comments demonstrate a powerful sense of strategic commitment to Iraq and the preservation of both Iranian and Shia political power. "Iraq used to be the citadel of opposition against Iran," he said. "This is why [the West] gave all that money to Saddam for such a long time, even before the creation of the Islamic republic."