In the summer of 2012, the leading commanders of the Free Syrian Army (FSA) were confident that momentum was with them.

A bomb blast deep inside central Damascus had just taken out four senior commanders of the Syrian army, including the country's defence minister, Dawoud Rajiha, and his deputy, Assef Shawkat, who was also President Bashar al-Assad's brother-in-law.

The explosion, believed to have been carried out by an insider sympathetic to the opposition cause, gave hope to rebels that it was only a matter of time before Assad met a similar fate.

{articleGUID}

That hope was bolstered by successes on the battlefield, as ragtag groups of fighters coalesced into more effective armed groups, large swaths of the country started to come into rebel control.

Fateh Hassoun, who defected from the Syrian army and commanded FSA troops in Homs at the time, told Al Jazeera he felt optimistic that forces loyal to Assad would not be able to withstand the burgeoning uprising.

"There was widespread defection among the Syrian officer corps, especially in the middle ranks, such as lieutenants and colonels, who formed the backbone of the Syrian army," Hassoun recalled, adding the army had been further weakened by government purges of officers.

He explained Syrian forces had been concentrated in the southwest of the country, in a posture aimed at deterring the threat from Israel.

It was a fact many defected officers were aware of and one that they would use to their advantage as they encroached on major Syrian population centres.

The successes, however, had not gone unnoticed by Syria's close allies, Iran and the Lebanese armed group, Hezbollah, both of which upped their involvement in the conflict, stemming the rate of rebel advances.

Hassoun said: "After the Iranian and Hezbollah intervention, the regime started making gains on the ground, especially in the central regions of Homs and Hama.

{articleGUID}

"Despite the Iranian intervention, the regime and its allies could not win the war, but they were successful in protecting the capital, Damascus, by besieging and keeping the opposition on the periphery of the city," he added.

Fellow FSA official, Bashar al-Zoubi, who commands the rebel umbrella group's southern front claimed the Syrian Army was only operating at a quarter of its full strength until the Iranians intervened.

He told Al Jazeera: "The Syrian army had all but collapsed and was operating at about 20 to 25 percent of its previous strength when the Iranians came and brought with them Hezbollah, and Iraqi and Afghan militias, who did most of the fighting on behalf of the Syrian army."

Zoubi said he believed the opposition would have won the war by early 2013 were it not for Tehran's involvement.

Shia militias

Iran has been eager to ensure its involvement in the Syrian conflict is not seen as direct participation.

To that end, its policy has primarily focused on the deployment of troops to the country ostensibly as military advisers, as well as training and ferrying Shia militias from across the Muslim world into the state.

Iranian media outlets put the number of Afghan Shia fighters, who form the Fatemiyon division, as high as 20,000.

They fight alongside other volunteers from Iran itself, Pakistan, and neighbouring Iraq, and are drawn by relatively high salaries, and by the idea of defending the Sayeda Zainab shrine in Damascus, one of the most sacred religious sites for Shia Muslims.

{articleGUID}

But Iran's role has involved more than just making up the numbers with foreign volunteers and the country has also played an important role in training Syrian militias.

"A big step came in autumn 2012 with the Iranian commitment to build up and lead the National Defence Forces (NDF) militias to cover the depleted Syrian Army," said Professor Scott Lucas, a University of Birmingham academic and founder of the EA WorldView website.

With a strength at their peak of 90,000 fighters, the NDF militias are a pro-government paramilitary formation, which have been credited with turning the tide of the war.

Iran has justified its involvement on the pretext of fighting what they describe as "takfiri" groups, such as the Islamic State of Iraq and the Levant (ISIL) group, but the militias they control or have trained have been directly involved in fighting against rebel groups, including those loyal to the FSA.

Economic ambitions

The reason for prioritising its own militias over the Syrian army, Lucas, explained was due to Iran's lack of faith in the Syrian army leadership and its own socioeconomic ambitions in the country.

Iranian commanders never trusted-and still don't trust- the effectiveness of regular Syrian units Scott Lucas, EA WorldView

"Iranian commanders never trusted - and still don't trust - the effectiveness of regular Syrian units," he said adding: "Iran wanted to have control of political-economic-military context, [as in] its now de facto control of parts of southern Damascus and its ownership of Syrian assets, such as phosphate mines."

Lucas said the Iranians had also taken de facto control of the area surrounding the Sayeda Zainab shrine in southern Damascus and was carrying out major construction projects in the area.

{articleGUID}

Iran's expanding influence, would be cause for concern among the government leadership, Lucas said, but as the government's survival was dependent on Iran, it was unlikely these concerns would turn into outward friction between the two allies.

"Publicly, of course, the Assad government won't really express its anxiety about the expanding Iranian influence," Lucas said.

"For example, if you take General Bakri's visit to Damascus this past week, all the statements were about Iranian and Syrian government cooperation against takfiri terrorism and Israel.

"The problem is that the Iranians have gotten an IOU from the regime, in that they basically saved it ... so it's going to be very difficult for the Assad regime to walk away from that."