President Bashar al-Assad always saw time as an ally in Syria's civil war, alongside the Russian and Iranian firepower he turned on his foes, sources familiar with his thinking say.
Now, as Arab states bring him back into the fold, the logic appears to have worked for him once again.
Assad could well be rubbing shoulders with Arab kings and presidents at a May 19 summit in Riyadh thanks to Syria's readmission to the Arab League, a big moment in his regional rehabilitation even as he continues to be shunned by the West.
It would have been unthinkable earlier in the conflict when Gulf Arab states swung behind rebels battling to oust Assad, and then U.S. President Donald Trump branded him an "animal" for using chemical weapons - an accusation he routinely denied.
He owes his survival in large part to Iran and Russia, which were always more committed to his survival than his adversaries in the West and Middle East were to seeing him toppled by rebels. Assad, 57, has outlasted many of the foreign officials who believed his demise was once imminent.
Now, geopolitical shifts in the Middle East have only strengthened Assad's hand as the region's most powerful states pursue entente over conflict, among them Assad's Shi'ite Islamist backers in Tehran and their Sunni rival Saudi Arabia.
"Syrian foreign policy is all about waiting for everyone else to come around to their position - just waiting and taking the punishment on the assumption their enemies will tire before they do. That has worked out for Bashar al-Assad - to an extent," said Aron Lund of Century International.
"But it's not like it is smooth sailing. Syria is such a broken place the sanctions aren't easily removed. I don't think this will be a game changer. But it does chip away at the isolation of the Assad regime."
Damascus has not yet said if Assad will attend the summit.
In exchange for ending Syria's isolation, Arab states want action, notably towards ending trafficking of the highly-addictive and lucrative amphetamine captagon across Syria's borders towards the Gulf.
Top Syrian officials and relatives of Assad have been put on sanctions lists in recent months in the United States, United Kingdom and European Union over the trade, seen as a point of leverage for Assad in his regional contacts. Syria agreed to help end the trafficking at a May 1 meeting in Jordan.
SIEGE WARFARE
Shaped early on by war in Iraq and crisis in Lebanon, Assad's rule came to be defined by the civil war which spiralled out of the 2011 Arab Spring, when Syrians demanding democracy took to the streets, to be met with deadly force.
Assad saw the war as a foreign-backed conspiracy against a proud Arab state that opposed the U.S. and its Middle Eastern allies, especially Israel.
Helped by Russia's air force and Iran-backed militias, Assad clawed back the bulk of Syria in years of conflict, deploying siege warfare to recover areas such as eastern Ghouta - a tactic condemned as "medieval" by U.N. investigators.
The determination with which he set about crushing his enemies drew comparisons with the way his father - the late President Hafez al-Assad - had defeated insurgents in the 1980s.
Justifying his response, Assad compared himself to a surgeon cutting into a wound. "Do we say to him: 'your hands are covered in blood?' Or do we thank him for saving the patient?" he said in parliament in 2012.
Even in the early years of the conflict, as rebels seized town after town, he appeared confident of victory.
But while he took back most of Syria, swathes of the country remained outside state control, cities were flattened, the death toll topped more than 350,000 people, and a quarter or more of the population fled abroad.
Assad enjoyed the backing of those Syrians who believed he was saving their country from insurgents bent on replacing him with hardline Sunni Islamist rule.
As al Qaeda-inspired groups gained prominence in the insurgency, this fear resonated among minority groups, including the Alawite sect which formed the backbone of his rule over the Sunni majority country.
Critics accused Assad of fuelling sectarianism.
The war's sectarian edge was hardened by the arrival of Iran-backed Shi'ite fighters from across the Middle East to support Assad, spearheaded by Lebanon's Hezbollah, and as Sunni Muslim-led states Turkey, Qatar and Saudi Arabia backed rebels.
'RED LINES'
Assad's value to Iran was underscored by a senior Iranian official who declared in 2015 that his fate was a "red line".
While Iran stood by Assad, the United States failed to enforce its own "red line" - one set by President Barack Obama in 2012 against the use of chemical weapons.
U.N.-backed investigations have concluded the state used chemical weapons including sarin and chlorine.
The deadliest gas attack was on the rebel-held Ghouta in 2013. The attack with sarin gas killed hundreds of people but prompted no Western military response. The threat of a U.S. missile strike was averted when Moscow brokered a deal for Syria's chemical weapons to be destroyed by the following year.
But poison gas continued to hit rebel areas, marking some of the most extensive use of chemical weapons since the First World War. One such attack in 2017, also with sarin, prompted Trump to order a cruise missile attack.
Assad consistently denied accusations the state was to blame. He similarly denied the army had dropped barrel bombs - barrels packed with explosives that wound indiscriminately.
He also dismissed tens of thousands of photos showing brutal torture of people in government custody as part of a Qatar-funded plot. U.S. sanctions introduced in 2020 to ramp up pressure on Assad were named after the defector who smuggled the images out of Syria, code named "Caesar".
As fighting died down, Assad accused Syria's enemies of turning to economic warfare. But while Assad remained a pariah to the West, Arab states which once backed his opponents began opening doors to him.
(Additional reporting by Laila Bassam; Writing by Tom Perry, Editing by William Maclean)