Assad is secure, but Syria's war shows no sign of ending
The view from the presidential palace in Damascus is the brightest it has been since the war in Syria started.
Russian President Vladimir Putin's decision at the end of 2015 to increase enormously the support he was giving to President Bashar al-Assad has transformed the war in the regime's favour.
The fall of the eastern side of Aleppo in 2016 was a hammer blow to the armed rebels who once had hopes of toppling the regime.
President Assad has not won the war. But it is hard to see now how he can lose it, without an equally decisive intervention against him by an outside power.
The jihadist group Islamic State was incubated by the war. It started as an offshoot of al-Qaeda in Iraq.
When it was driven out it was able to regroup and transform itself in Syria, taking over territory that the central government lost.
The first peaceful demonstrations against the regime in March 2011 seem a world away. Change seemed to be sweeping the region.
President Assad had talked endlessly about reform of the system in Syria since he inherited power from his father in 2000.
He admitted there was corruption. He did not talk about the well-documented brutality of the security services.
By the standards of the leaders of authoritarian Arabs he seemed relatively open to new ideas, but he never translated talk into action.
The immediate assumption in 2011 was that Bashar al-Assad would go the way of the leaders of Tunisia, Egypt and Libya.
But the Syrian regime, unlike those in Tunisia and Egypt, was well constructed to resist rebellion, around a core of Alawites from the president's own minority sect.
Unlike Egypt's President Hosni Mubarak, Syria's president never lost the loyalty of his armed forces, or of his key foreign allies.
He also had real support from important sectors of the population, without which he would not have survived.
Syria has been caught up in the tide of sectarianism that has ripped across the Middle East since the US-led invasion of Iraq in 2003.
Most of the rebels were Sunnis: Sunni governments in Turkey, Saudi Arabia and Qatar supported different groups.
The dominant Alawite minority in Syria is a branch of Shia Islam; the regime's biggest supporters outside Russia are the Shia regime in Iran and Hezbollah, the Lebanese Shia movement.
The first generation of rebels begged Western powers, and sympathetic Saudis and Qataris, for military support. It arrived, but not on the scale that Russia gave President Assad later in the war.
In Libya, Colonel Muammar Gaddafi would probably have regained his grip on power had the UK, France and the US, and allies from Nato and Arab countries, not provided the rebels with an air force. Nothing like that was attempted in Syria.
Generals from Nato countries say that early in the war they had credible plans that could have ended the Syrian war.
But they did not have political leaders who were prepared to take the considerable risk of intervening - and in the White House, President Barack Obama was determined not to repeat the mistakes of his predecessor George W Bush by getting involved in another big Middle Eastern war.
The crucial turning point came in August and September of 2013, after an attack using chemical weapons on rebel-held areas in the suburbs of Damascus.
President Obama first threatened force against the regime, then changed his mind.
In wars, hard power is decisive. Without it, Western countries could only huff and puff against President Assad.
Western countries never decided what they wanted in Syria, beyond saying that Mr Assad had to go.
President Putin knew exactly what he wanted - to preserve a friendly regime and show his supporters and the wider world that Russia was back on the world stage. He made it happen.
From the very beginning, President Assad and his people have presented the war as a foreign conspiracy intended to destroy secular, multi-cultural Syria.
The choice, he said, was stark - the regime or Islamist, terrorist extremists, and he made no distinction between different kinds of armed opposition.
They were all terrorists, all enemies of the Syrian people and therefore were legitimate targets.
The Syrian armed forces, President Assad has said throughout, are the protectors of the people.
Early in the war, if you crossed the line from regime held areas to ones controlled by rebels, as I was able to do several times, the message was very different.
Fighters denied foreign conspirators inspired them.
Many said they were local men who had taken up arms against a cruel dictator. Some were migrants from the countryside who had suffered badly during years of drought that had been handled badly by corrupt and inept administrators.
But that relative simplicity became muddled as the war developed layers of conflict, as rebel groups changed, sometimes self-destructed, fought each other as well as the regime, and were kept under constant pressure by the Syrian military.
The people of Syria suffered appalling privations.
Half lost their homes, and either left the country as refugees or were displaced, often many times, within Syria.
The Syrian armed forces used siege tactics against enclaves controlled by rebels, sealing them off, stopping food deliveries, and shelling and bombing from the air.
Civilians died in huge numbers.
All the available statistics, denied by the regime, say that the biggest killer of civilians has been the Syrian armed forces.
I have interviewed the president, and had many conversations with Syrian officers about the scale of killing by the military.
They deny it has happened, and speak passionately about their desire to protect Syrians from religious extremists.
But the tactics they have used against areas controlled by rebels and with large civilian populations guarantee that many will die.
Barrel bombs are an indiscriminate weapon, and artillery and air strikes have laid waste to huge areas.
I have seen the damage myself in areas recaptured from rebels.
In many parts of east Aleppo, which was pounded by the regime and by the Russians, it is hard to find buildings that are undamaged. Entire districts were levelled.
Rebel groups have also used indiscriminate force, but they have a fraction of the firepower of the regime and its allies.
Statistics are unreliable in a country that has been in chaos, with many areas impossible to reach. But they give an idea of what has happened.
The Syrian Observatory for Human Rights, which is a monitoring group based in the UK using sources in Syria, says 321,000 people, including 96,000 civilians, have been killed in the war. Another 145,000 are missing, it says.
So many foreign powers, Western as well as Middle Eastern, have intervened in Syria that it became a mini world war.
The regime is secure, but it does not control large areas of the country. Civilians continue to suffer.
More people are going to die in a war that has changed but not ended.