General Qassem Suleimani, the commander of Iran’s elite Quds force - one of the key players in the war against Islamic State (Isis), normally keeps a very low profile.

But a recent spate of photographs – showing a shy, silvery-haired man in his late 50s wearing a revolutionary scarf around his neck – point to a striking shift in Tehran’s strategy in its fight against the jihadi insurgents who have taken over large parts of Iraq and Syria.

Once rare and amateurish, images of Suleimani are now taken professionally as Iran publicises its indispensable role in Iraq – even boasting about the operations of its elite special forces in the territory of its volatile neighbour.

“Baghdad was prevented from falling because of the presence and assistance of the Islamic republic,” Yadollah Javani, a senior adviser to Iran’s supreme leader, Ayatollah Ali Khamenei, declared as pictures of the general with a group of Kurdish peshmerga fighters were aired on Iran’s state TV.

“With the Islamic republic’s help, experience and advice, the people of Iraq have blocked the actions of Daesh [Isis in Arabic].” Suleimani was risking martyrdom, Javani said. “We will not let insecurity come close to our borders.”

Suleimani and the Iraqi militias he commands have played a key role in halting Isis. But neither he nor any other Iranian official has been invited to Tuesday’s strategy meeting in Washington between the US president, Barack Obama, and military chiefs from 20 western and Arab countries, which aimed to draw up a plan to defeat the militants.

The crisis in Iraq may have created a temporary alignment between the US and Iran, bitter enemies for the last 35 years, but they remain firmly at odds over Syria, where Tehran’s loyal support has been crucial in bolstering Bashar al-Assad. David Cameron has said that Iran needs to “show it can be part of the solution, not part of the problem” – citing its support for terrorist organisations, its nuclear programme and its human rights record.

Suleimani’s pictures tell a story of Iran seeking both to improve its international position and to reassure its own people. “The idea is to get across that Iran is very much present in Iraq and it is there to defend its interests,” said Dina Esfandiary of the International Institute for Strategic Studies.

“It’s PR activity: they’re doing it to reassure Iranians that are worried about the Islamic State that Iran is taking the necessary steps to protect them.”

Suleimani and his forces have been active in battles against Isis: in Diyala near the border with Iran as well as in Amerli in the north and in Iraqi Kurdistan.

Iran is particularly concerned about the safety of Shia religious cities and shrines in Iraq, such as Samarra, Kadhimiya, Najaf and Karbala. But protecting them has come at a price: pictures were published in June showing the first Iranian martyr killed fighting Isis and several similar funerals have since been held across Iran.

When Isis seized large swaths of Iraqi territory and this was followed by the replacement of the Iraqi prime minister, Nouri al-Maliki, Iran was depicted as having lost control in Iraq. But now Tehran is working to change that image. “Unlike in the past, Iran has decided to speak publicly and confirm its role – especially the presence of the Quds force and Suleimani himself in Iraq’s defensive actions against Daesh,” said Moraad Veisi, an analyst with Radio Farda in Prague.“In Jalawla [in Diyala province], Iran provided the artillery and even brought the people who fired the artillery. Later Iranian advisers participated in the operation to break Amerli’s siege. Suleimani was involved in designing the operation to break that siege,” he said.

In Iraqi Kurdistan, local officials have admitted that Iran was one of the first countries to provide weaponry, while officials in Tehran have claimed credit for protecting Kurdistan’s capital, Irbil.

Amirali Hajizadeh, a Revolutionary Guards airforce commander, has appeared on national television confirming Suleimani’s presence in Kurdistan. “If it wasn’t for Iran’s help, Iraq’s Kurdistan would have fallen into the hands of Daesh,” he said last month.

In Diyala, Iran was effective due to the presence on the ground of the powerful Iranian-backed Shia Badr brigade, whose commander, Hadi al-Amiri, is a close ally of Suleimani.

“Iran acts in places where a local Iraqi force is present on the ground,” Veisi said. A Kurdish source echoed Veisi: “The Islamic republic does not need to send troops to Iraq as long as it has access to the Shia militia such as the Badr brigade.”

But above all, Veisi said, Suleimani’s presence has been crucial in protecting Baghdad. “Suleimani designed the defence ring around Baghdad, that is what is more important and unannounced about Iran’s role in Iraq and against Daesh,” he said. “Daesh poses threats to Baghdad from four fronts. There are five ways in to Baghdad and except for the one in the southeast the other four ways are insecure and Daesh is there somewhere.”

Isis currently holds both Falluja, 70km (43 miles) west of Baghdad, and the northern city of Samarra, 120km from the capital.

Other Iranian officials have also stressed the importance of Iran in the fight against Isis. Ali-Akbar Velayati, a senior advisor to Khamenei, told the former French foreign minister, Dominique de Villepin, in Tehran last week that: “We helped Syria and Iraq to battle terrorism and the Isil [Isis]”. Iran’s head of parliament, Ali Larijani, said: “If Iran had not got involved in the Iraqi issue, the situation of Iraq could have spun out of control.”

Viewed from Tehran, Iraq matters more than Syria, said Esfandiary. “Iraq is important to Iran, especially compared to Syria, so I don’t think Iran would hesitate to take further action in Iraq if it has to. But at the moment it doesn’t have to as the western air strikes are helping Iran out as well,” she said.

“Syria is a more distant threat. Certainly for the Iranian population Iraq is much closer to home and one thing that Suleimani’s images do is to reassure the Iranian public that the situation in Iraq is under control.”

But active cooperation between Iran and the US still looks unlikely. “I think that today cooperation is too big a word,” Esfandiary said. “Coordination is more likely. Tactical coordination may even be happening at the moment.” Suspicion remains strong on both sides. “Iranians, particularly the hardliners and Khamenei are just not open to collaborating with the west at the moment and the west isn’t interested either. Nothing is going to happen until there’s a nuclear deal.”

Khamenei has made clear in recent months that he stands opposed to the US-led coalition against Isis and views it as an American attempt to further its military presence in the Middle East. On Monday, he accused the US, Israel and Britain of creating Isis, which he said was aimed at fomenting divisions between Sunni and Shia Muslims.

In recent months, Iran also has had a number of border skirmishes with Isis. Last week, Iran’s intelligence ministry announced it had captured around 130 terrorists linked to Takfiris: extremist Sunni groups cooperating with Isis.

But Veisi said he did not believe Isis posed any territorial threat to Iran, but rather challenged Tehran’s concept of a “Shia crescent” stretching across the Middle East. “The most important issue for Iran,” he said, “is not to have any communications or geographical gap in its so-called Shia crescent, which spans from Iran to Iraq to Syria and to Lebanon”.