At a meeting in Moscow in July, a top Iranian general unfurled a map of Syria to explain to his Russian hosts how a series of defeats for President Bashar Assad could be turned into victory — with Russia's help.

Maj. Gen. Qassem Soleimani's visit to Moscow was the first step in planning for a Russian military intervention that has reshaped the Syrian war and forged a new Iranian-Russian alliance in support of Assad.

As Russian warplanes bomb rebels from above, the arrival of Iranian special forces for ground operations underscores several months of planning between Assad's two most important allies, driven by panic at rapid insurgent gains.