While Syria remains torn between Russian, American and Turkish interests, with world leaders working to avoid a bloodbath in the remaining pocket of resistance, one thing is certain: President Bashar Assad has won Syria’s devastating seven-year civil war.

To secure his victory, experts say, Assad helped incubate the extremism that led to the rise of the Islamic State and the further spread of jihadism in Syria – the very elements he now vows to destroy in Idlib, the last rebel enclave in the country and home to millions of civilians and refugees.

>> Israel faces a much bigger challenge in Syria than S-300s | Analysis

Robert Ford, the ambassador to Syria under President Barack Obama and the last U.S. ambassador to the country, told Haaretz that Assad “will stay in power for as long as the eye can see,” and more importantly there “won’t be any Nuremberg-like trial of Assad and his associates.”

Furthermore, he says, not only will Assad not be held accountable for the use of chemical weapons or other wartime atrocities, but his allies Russia and Iran that helped him defeat the rebels won’t be able to bankroll the rebuilding of the war-ravaged country.

“The Syrian government lacks financial resources, and neither Russia nor Iran can provide much more than they already provide,” says Ford, now a fellow at the Middle East Institute in Washington and a professor at Yale.

To really understand Israel and the Middle East - subscribe to Haaretz

Former ambassador to Syria: U.S. can't change Assad regime Credit: CNN from 2014

Assad’s downfall seemed all but guaranteed at many points during the eight years since the Arab Spring began to topple Middle Eastern dictators. Yet Assad has now outlasted fellow despots like Egypt’s Hosni Mubarak and Libya’s Muammar Gadhafi, and also Western leaders like Obama and Britain’s David Cameron who once vowed to stop his bloodletting and drew red lines warning Assad against using chemical weapons or risk regime change.

Ford, who resigned in February 2014 to protest Obama’s alleged lack of policy against Assad, had regularly met with the rebels and wrote in The New York Times in June 2014 that while “these men were not angels … they acknowledged that they would ultimately have to fight Al-Qaida and the foreign jihadis.” But in the end it was Assad who ended up convincing much of the West that he was a better choice than the rebels to help battle the Islamic State and jihadism.

A new narrative

In 2011, months after the uprising against Assad began in Daraa and quickly started to destabilize the country, his regime released thousands of jihadists from Syria’s now infamous prisons.

Using a cold and pragmatic calculus, Assad fomented chaos and terror to discredit the opposition and ensure that the West wouldn't intervene against him. Syrian war expert Christopher Phillips details how Assad tied the opposition to jihadists in his comprehensive 2016 book "The Battle for Syria: International Rivalry in the New Middle East."

Phillips told Haaretz, “it is hard to tell just how successful the discrediting strategy was. Certainly the majority of Syrians who didn't flee or take up arms seemed to tacitly back Assad but was that because they didn't trust the opposition or because they feared the regime? It was probably a mixture of both.”

“In 2011, the majority of the current ISIS leadership was released from jail" by Assad, Mohammed Al-Saud, a Syrian dissident with the National Coalition for Syrian Revolutionary and Opposition Forces, told Newsweek in 2014. “No one in the regime has ever admitted this, or explained why.”

The leaders of two major Islamist groups, Hassan Aboud of Ahrar al-Sham and Zahran Alloush of Jaysh al-Islam, were also both in Assad’s prisons in early 2011. Additionally, as the Islamic State began to take root in Syria and spread into Iraq, Assad let the group grow. Phillips wrote in The Atlantic in August that this “was partly pragmatic, as ISIS was in the peripheral east while other rebels threatened the western heartlands, but it was also strategic.”

“The regime did not just open the door to the prisons and let these extremists out, it facilitated them in their work, in their creation of armed brigades,” a former member of Syria’s Military Intelligence Directorate, one of more than a dozen of Syria’s secretive intelligence agencies, told Abu Dhabi-based The National in 2014.

Assad “concocted a legitimizing narrative: It portrayed the oppositionists as violent, foreign, sectarian Islamists,” Phillips wrote, “in the hope that only jihadists and his regime would be left for Syrians and the world to choose from.”

Assad’s survival and Hezbollah’s lasting presence

As the war progressed, Hezbollah, Iran and later Russia intervened militarily to help Assad, while the United States, Turkey and the Kurds fought in Syria and set up military bases to battle the Islamic State in Syria and Iraq. Hezbollah was “absolutely key” to Assad’s survival, Phillips says.

>> Read more: How Russian Military Support Is Secretly Airlifted to Syria's Assad | Putin's Private Army in Syria: Officially Illegal, the Kremlin Denies It, but the Evidence Is in the Numbers

Hezbollah members were the first foreign fighters, in 2012, to enter on Assad’s side and “led the way in key battles like Qusayr and in reorganizing the army and pro-Assad Syrian Democratic Forces,” Phillips told Haaretz. “Iran’s Soleimani may have been the brains, but Hezbollah were the trusted implementers,” he added, referring to the head of the Iranian Revolutionary Guards’ Quds force.

Iran has long viewed its presence in Syria as key in its desire to establish a land bridge between Tehran and Beirut, a strategic asset it hopes would thwart both Saudi Arabia and Israel, its regional rivals.

Another major factor that allowed for Assad’s survival was the strength of prewar Syria’s government. Phillips wrote that in 2000, when Assad came to power, he had “inherited a coup-proofed regime” from his father, Hafez Assad.

The structure Hafez built lasts to this day, and as Ford adds, it's the reason “neither Russia nor Iran control the Syrian power elite inner circle and that circle has stayed loyal to Assad consistently through the civil war.” Most of Syria’s top security positions are packed with Alawites, the sect the Assad family belongs to, which is only about 10 percent of the predominantly Sunni population. While Assad’s army suffered mass desertions and lost well over half its soldiers in the first four years of the war, the power structure around Assad stayed loyal.

What’s next for Syria?

Assad’s survival has left Syria in ruins; the country is now “weaker, poorer and less influential in the region,” Ford says. Assad's travel is now restricted to “friendly” countries, lest he face extradition.

Russia, while reeling from its own economic woes, is working behind the scenes to secure funding to rebuild Syria. “Russia wants to show the world that the Syrian civil war is largely over, and refugees returning would be one indicator that the Assad government has won its victory,” Ford says.

Open gallery view Syrian government forces are preparing a phased offensive in the province of Idlib and surrounding areas Credit: Reuters

The Trump administration, however, has made clear that Washington will not help fund the rebuilding effort, and U.S. sanctions make foreign investment very difficult in the country.

The Russian government even went so far as to release a list from its "refugee coordination center" at Khmeimim air base in Syria claiming that 900,000 refugees could return to Syria soon from Lebanon, Jordan and Turkey. Turkey is amassing troops near Idlib and fears a mass exodus from the region toward its border.

But Ford says Syria’s basic infrastructure can't handle a returning population. Recent estimates to rebuild Syria range from $250 billion to $400 billion, according to AP. “Little of Homs and Aleppo cities have been rebuilt even though fighting in those cities ended years ago," Ford says. "Where would refugees live? What jobs would they have? What about clean water and electricity and heat for winter?”

As a result, Russia has been lobbying Germany and France and even Turkey to foot the bill to rebuild Syria, while Trump has been pressing his allies not to support Assad financially. Iran’s indefinite presence in Syria is also all but certain to keep U.S. funding out and continue to isolate Syria both economically and diplomatically.

Assad’s ruthless victory has created one of the largest refugee crises since World War II, one that has brought out demons in many Western countries now embracing anti-immigrant and anti-Muslim politics.

The reconstruction and repatriation effort faces another problem – many refugees may not want to return. Syria’s security services are checking information on each refugee and, according to Ford, there are stories in the media of some people being detained or promptly sent into military service upon their return. Russia, Assad and Turkey have agreed for the time being not to enter Idlib and destroy the jihadists there at the expense of civilian lives, delaying the final military push that most observers still see as inevitable.

>> Read more: After ISIS Loses Its Capital, Focus Turns to Strengthening Global Terror Network | The Rise and Fall of ISIS: From Organization to State

Additionally, a recent UN report estimated that between 20,000 and 30,000 Islamic State fighters remain in Syria and Iraq – despite Trump’s recent declarations of victory over the group. The Islamic State, recent events indicate, remains both an international and internal threat, and Iran even declared Wednesday that it killed 40 ISIS leaders with six missile strikes in retaliation for the September 22 attack on a military parade in Iran that killed 25 people, nearly half of them members of the Revolutionary Guards.

So while Assad may soon finally defeat the rebels who sought to tear down his regime and regain his territory (except the 28 percent held by the U.S.-backed Kurds in the northeast), he'll be left with a country facing a severe humanitarian crisis, few resources to rebuild with and well-armed and trained jihadists still gunning to end his secular rule through terror.