But buttressed by Russian air power, Iranian expertise and recruits that include Iran-trained Iraqi and Afghan militias and fighters from the Lebanese militant group Hezbollah, the Assad government has reversed the tide, steadily regaining ground it lost earlier in the war.

“The Russian and Iranian intervention has completely changed the dynamic for Assad,” said Robert S. Ford, a former American ambassador to Syria and now a senior fellow at the Middle East Institute.

“Look at the fighting in Aleppo,” he added. “There are at least as many Lebanese Hezbollah and Iraqi-Iranian militia fighters as there are soldiers born in Syria, so the war of attrition that was going against Assad is no longer doing that because of Iranian manpower.”

But the darker side is what kind of country would be left. “So Assad stays there and the Russians and Iranians prevail, but they govern over a half-dead corpse, and Syria is just this gaping wound that stretches as far as the eye can see,” Mr. Ford said.

Mr. Assad would also be beholden to his two sponsors, Russia and Iran, reviled by many of his own citizens in the Sunni-majority country and rejected by some of the main Sunni powers in the Middle East. That could mean he would face efforts from Iran to solidify its regional reach by expanding Shiite influence in Syria and demanding a role in conquered areas such as Aleppo, perhaps even assigning Iranian-backed Shiite militias there, some experts said.

Still, he is ascendant now, in a limited fashion. The rebels lack consistent military aid — particularly with the incoming administration of President-elect Donald J. Trump expressing doubts about the current level of American support for them — and they are divided among a bewildering array of groups, including Qaeda aspirants and Kurdish separatists. They have witnessed a decline not only in fighters but in community support, always a critical factor for guerrilla movements.

When Russia entered the Syria conflict last year, President Obama’s security team predicted that it would become trapped in a quagmire. Almost the opposite has happened: Russia now looks strong and, along with Iran, has given the Syrian government the resources it needed to make military headway.