A few months after Iran asked Hezbollah to join the fighting in Syria alongside Mr. Assad’s forces, it began raising other Shiite militias. The Fatemiyoun Division (formerly Brigade), a militia of Shiite Afghan refugees, was formed around early 2014 and trained by both the Revolutionary Guards and Hezbollah veterans. Its strength has been estimated at 8,000 to and 14,000 men. The Iranian authorities maintain the fighters are volunteers.

The initial recruits to the Fatemiyoun Division were initially Shiite Hazara Afghans, who settled in Iran after the Soviet occupation, after the civil war in the early 1990s and the subsequent Taliban rule. Their recruitment had echoes of how Pakistan — the other major host of the Afghan refugee population — recruited the Sunni Pashtun Afghan refugees and their children to form the Taliban in the mid-1990s.

In the past few years, Iranians have expanded recruitment to undocumented Afghans, like Mr. Amin, recently arrived from Afghanistan in search of economic opportunity. Apart from the refugees’ economic anxiety and precarious legal status, the Iranians exploit the Shia faith of Afghan refugees to recruit them to fight for the Assad regime in Syria.

Iranian propaganda framed the Syrian war to these refugees as a Shiite struggle for the defense and protection of the faith and its holy sites. “The fighters have little or no knowledge of the political-security context into which they are marching,” said Ahmad Shuja, a former researcher with Human Rights Watch. “They do not speak Arabic, most of them have never been beyond Afghanistan or Iran, many are barely literate, most are devout Shiites.”

Mr. Amin, for example, believed that the Syrian war resulted from a dispute between the Nusra Front jihadist group (which was officially founded in 2012) and Mr. Assad. He had been made to believe that the war broke out after the leader of Nusra (who, he said, was related to Mr. Assad) wanted to build a store over a mosque. Mr. Assad, an Alawite, rushed to defend the mosque and protect all religious sites, especially the Shiite shrines, in the country. In turn, in Mr. Amin’s telling, Nusra called for Mr. Assad’s downfall and the destruction of shrines.

Iran’s Revolutionary Guard and Hezbollah fighters trained Mr. Amin and the Afghan recruits of the Fatemiyoun Division in using weapons and tactical movement for a month. Some were trained as snipers; some were trained in tank warfare. After the training they were flown to Syria and sent to the front lines in Damascus and Aleppo.

Iranians and Mr. Assad’s forces used the Afghan recruits as the first-wave shock troops. “We would be the first in any operation,” Mr. Amin recalled. Several short memoirs by current and former Afghan fighters in Syria published on the Telegram app, which Mr. Shuja studied, recount the Afghans being sent to fight the most difficult battles, and speak about heavy casualties among Afghan fighters and the eventual victory after multiple assaults.