It was not so long ago that Bashar Assad's enemies thought he was finished.

In the summer of 2012, the rebels were not just at the gates of Damascus, but inside the capital, preying on Assad's harried forces.

His government had lost big chunks of Syria's territory and a string of strategic towns, and a small number of loyal and tested army units were rotating around the country in an exhausting attempt to hold back rebel advances on many fronts.