By Marwan Makdisi
DAMASCUS, July 16 (Reuters) - Bashar al-Assad was sworn in for a new term as Syria's president on Wednesday, after an election which his opponents dismiss as a sham but which he said proved he had achieved victory after a "dirty war" to unseat him.
Once written off in the West as certain to fall, he launches his seven-year term in his securest position since the early days of the three-year-old war. Those close to Damascus say he now believes his Western and regional foes will be forced to deal with him as a bulwark against Sunni Islamist militants who advanced across northern Iraq last month.
At his inauguration he delivered a defiant speech, vowing to recover all Syria from Islamist insurgents and warning that Western and Arab countries would pay dearly for supporting rebels he described as terrorists.
Looking calm and confident, the president of 14 years repeatedly took aim at the West and Sunni Muslim Gulf Arab monarchies who have funded and armed the rebels that have taken control of much of the north and east of his country.
"Soon we will see the Arab, regional and Western states that supported terrorism pay a high price," he said in the speech at the presidential palace in Damascus, broadcast on state TV.
"I repeat my call today to those who were misled to put down their guns, because we will not stop fighting terrorism and striking it wherever it is until we restore security to every spot of Syria," Assad said.
But with swathes of the country still in rebel hands, opponents said the speech showed Assad was delusional.
"This is completely separated from reality. Assad is going on as if everything is normal and as if he didn't lose two-thirds of the country," Monzer Akbik of the Western-backed National Coalition opposition group told Reuters. "It was a theatrical election and this is a theatrical swearing in."
Syria's war has been the battleground for a sectarian struggle between groups supported by Sunni Muslim states including Saudi Arabia and Qatar, and Assad's government backed by Shi'ite Iran.
Last month it spread dramatically in Iraq, where an al Qaeda offshoot operating on both sides of the frontier, the Islamic State in Iraq and the Levant (ISIL), seized cities, changed its name to the Islamic State and declared its leader ruler of all Muslims.
ISIL has officially been rejected as a terrorist group by the Gulf states that support other Sunni fighters in Syria, but Damascus, Baghdad and Tehran all blame the Gulf kingdoms for supporting the wider Sunni militancy that feeds it.
Since advancing in Iraq, ISIL has also expanded its reach in Syria, using weapons seized from the fleeing Iraqi army to fight against rival rebel factions in Syria.
Those around Assad now feel that the ISIL threat will force Western leaders to seek a way to work with him against the common foe, said Salem Zahran, a Lebanese political analyst who is sympathetic to Assad and meets Syrian officials regularly.
"The Syrian leadership truly feels that the time of isolation is over."
Assad took power in 2000 after the death of his father Hafez who ruled for three decades. He has held firmly onto control in Damascus since the revolt began, defying confident predictions by Western leaders, including U.S. President Barack Obama, that he would be swiftly toppled.
The revolt, which began with pro-democracy protests in 2011 that Assad dismissed in his speech as the "fake Arab Spring", rapidly descended into sectarian civil war in which more than 170,000 people have been killed. According to the United Nations, 10.8 million Syrians now urgently need aid.
Western countries lined up from the outset behind the rebels that opposed Assad, but unlike in the case of Libya, where NATO warplanes helped bring down dictator Muammar Gaddafi, they have refused to provide overt military support.
Wednesday's inauguration comes nearly two years to the day since the nadir of Assad's grip on power, when bombers managed to strike a security meeting of his inner circle in Damascus, killing close relatives leading his defence.
But although the rebels made further gains, Iran and Lebanon's powerful Hezbollah Shi'ite militia came to Assad's aid the following year, the start of a counter-offensive that has seen his forces go on to reclaim wide swathes of territory.
Meanwhile, the rise of Sunni jihadists like ISIL among the rebels has dampened Western enthusiasm for aiding Assad's enemies, led to infighting within the rebel ranks and bolstered Assad's assertions that his government is fighting extremism.
Obama threatened air strikes last year after blaming Assad for a poison gas attack that killed hundreds of people in a Damascus suburb. But the United States called off the operation when Assad agreed to give up chemical arms, effectively ending any threat that the West might use force to remove him.
In his speech, Assad dismissed the Syrian opposition abroad as traitors but said he would be willing to work with the country's internal opposition, without giving details.
He also spoke about government plans for the future such as the need to fight corruption, ideas for religious educational reform and a programme to rebuild some damaged areas.
The inauguration featured a display of carefully orchestrated adulation that has been typical of his infrequent public appearances since the start of the war. Dressed in a dark suit, he arrived at the presidential palace in a black car and walked down a red carpet as a military band played. He entered a hall to applause from politicians and religious leaders.
Assad's government says the election is proof of its willingness to enact democratic reforms. He ran against two other candidates, making it the first contested presidential election in Syria's history, after four decades of referendums to approve the appointment of Assad and his father. Official returns gave him 88.7 percent of the vote. (Additional reporting by Sylvia Westall, Laila Bassam, Oliver Holmes, Mariam Karouny and Tom Perry in Beirut; Editing by Peter Graff)