A rebel onslaught on the town of Khan Touman near Aleppo last week delivered one of the biggest battlefield setbacks yet to the coalition of foreign Shia fighters waging war on behalf of Syrian President Bashar al Assad.
Reports put the death toll among the Iranian, Afghani and Lebanese militiamen as high as 80 in the attack spearheaded by the al Qaeda-linked Nusra Front. At least 17 of the dead were Iranians, seemingly the highest toll in a battle outside the Islamic Republic's borders since the Iran-Iraq war.
"Pray for us, we can't move. There are 83 of us in one room. We're waiting for artillery backup so we can pull back," an Iranian fighter wrote in a WhatsApp message, quoted by state-run Iranian website Jaam-e-Jam. "God willing, we are martyred rather than taken prisoner."
Events in Khan Touman were followed by an even bigger blow to Iran and its allies: news emerged early Friday of the killing of Hezbollah commander Mustafa Badreddine, who had been overseeing the Lebanese group's military operations in Syria.
It is unclear how such reversals will affect the course of a war that grew out of Arab spring-inspired protests in 2011 calling for democratic change. Before Iran, Hezbollah and Russia came to Assad's aid, his grip on power appeared to be failing. The commitment of these allies to support him is seen by diplomats and Middle East experts as key to Assad's survival.
Such blows are evidence of the price being paid by Iran and Hezbollah in Syria, and the wide range of adversaries they face in a multi-sided war that has escalated again in recent weeks as U.N.-led diplomacy has foundered.
Israel has not missed the chance to pick off top Iranian and Hezbollah commanders in Syria over the past year or more.
Hezbollah, a Shia group established by Iran's Revolutionary Guard, said Badreddine had been killed in an explosion near Damascus airport. One Hezbollah official blamed Israel. The Israeli government has not commented.
Other enemies in the predominantly Sunni insurgency are meanwhile celebrating what they see as Iran's defeat in Khan Touman, which followed the loss of the nearby town of al-Eis.
One security expert close to Damascus described low morale on the government side because hard-won territory had been lost.
One explanation of the reversal could be that there is less Russian air support. Russia has been mounting air strikes in support of Assad for seven months, but it has also been involved in U.S.-backed diplomatic efforts and supported ceasefires.
The Syrian Observatory for Human Rights and a rebel fighting in the area said the intensity of recent Russian air strikes had diminished. That could be a source of friction between the alliance supporting Assad, analysts of the conflict say.
Shock in Iran
The attack by Nusra and its allies on Khan Touman created shockwaves in Iran. Sites linked to the Iranian Revolutionary Guard Corps published the names and photos of 13 Iranians killed in Khan Touman. Most of them were from a unit of the Guard in Mazandaran province in northern Iran.
But there were concerns among some Iranian officials and military leaders that the report of heavy casualties could sway public opinion against Iran's involvement in Syria.
A press release from the Revolutionary Guard office in Mazandaran, the province where most of the Iranians killed were based, reflected these concerns.
In order to "preserve calm in society" only information released by their office should be trusted, it said.
Among the Iranians killed was Shafie Shafiee, a commander of the elite Quds force, according to the Tasnim news site, which is affiliated to the Revolutionary Guards. His body was seized by Syrian rebels, according to the another site, ABNA.
Pictures posted by rebels and reprinted by Iranian news sites show closeups of individual fighters killed in the battle. One photo shows what appears to be at least a dozen bloodied corpses lined up in the hallway of a building.
Another set of photos posted by the Syrian opposition show two prisoners of indeterminate nationality, bound and bloodied, being led behind a vehicle.
Mohammad Saleh Jokar, a member of the Iranian parliament's National Security and Foreign Policy committee, said there were not any precise numbers on how many Iranians had been killed or taken prisoner in the Khan Touman "disaster".
Parliament speaker Ali Larijani called it a crime carried out by "cowardly terrorists" during a ceasefire - an apparent reference to a cessation of hostilities agreement to which the Nusra Front and other militants groups are not a party.
"This incident will not go unanswered," Ali Shamkhani, the secretary of the Supreme National Security Council said in an interview with the Young Journalists Club news site this week.
Footage shot from a drone by rebels shows a complex assault on Khan Touman that began with a barrage of rockets or mortars and involved armored vehicles and a tank. A mushroom cloud, apparently caused by a car bomb, is seen erupting near a building.
Hezbollah vows to fight on
Iran has announced the death of half a dozen generals in Syria, and a much larger number of less senior officers since 2012.
Hezbollah has meanwhile lost four prominent fighters, including Badreddine, a brother-in-law of the group's late military commander Imad Moughniyah.
Badreddine was the most senior Hezbollah figure to be killed since Moughniyah was assassinated in 2008, also in Damascus.
Hezbollah is estimated to have lost a total of around 1,200 fighters in Syria, where its highly trained guerrillas have provided crucial support to the Syrian military.
The group depicts its war in Syria as an existential struggle against ultra-radical militants such as the Nusra Front and Islamic State, groups it refers to as "takfiris".
Speaking at Badreddine's funeral in Beirut's southern suburbs on Friday, deputy Hezbollah leader Naim Qassem said: "Oh martyr we are continuing in the path you chose, in confronting Israel and in confronting the takfiris".