The road to Bashar Assad's palace on the edge of Damascus has four checkpoints manned by Republican Guards and plain-clothed police which guests must pass before they reach the main gate.

Assad's air of confidence — a constant through more than two years of conflict — appeared almost delusional when rebel mortars and bombs were tearing at the heart of Damascus and fighting closed its airport to foreign airlines late last year.

But after weeks of counter-offensives by Assad's army in the south of the country — against opposition fighters' supply routes east of Damascus and most recently in the border town of Qusayr — that optimism looks less irrational.

The fall last week of President Muhammad Mursi and the Muslim Brotherhood in Egypt prompted a defiant Assad to proclaim the defeat of political Islam. The Brotherhood's Syrian branch, already under pressure from more radical opposition groups, was dealt a psychological blow that comes on top of delays to promised supplies of weapons from Washington.

Congressional committees are holding up a plan to send US arms to the rebels because they doubt the deliveries will be decisive in the war and they fear the weapons might end up in the hands of militants, US national security sources have told Reuters.

From teenage protest in the southern city of Deraa, Syria's uprising against four decades of Assad family rule escalated into nationwide demonstrations, armed insurrection and finally an increasingly sectarian civil war drawing in regional powers.

Assad's crackdown on the protests against him two years ago drew inevitable comparisons with his father, Hafez Assad, who seized power in a coup in 1970 and ruthlessly put down an armed uprising in the city of Hama a dozen years later.

Three decades after Hama, in the era of the Internet, camera phones and global media, conventional wisdom said no leader could crush an uprising in the way the elder Assad did in 1982, killing more than 10,000 people, and hold on to power.

In Tunisia and Egypt, leaders were toppled within weeks by peaceful protests and when Libya's Muammar Gaddafi used military force against rebels, NATO forces provided support to help his opponents bring him down. But Assad, aided by powerful security forces dominated by his Alawite minority and shielded by international allies Russia and Iran, has proved far tougher.

But defections have stripped away some of his entourage, including Manaf Tlas, son of the former defense minister, who grew up with the young Bashar.

"He was cheated by many of his friends," said one person who visited Assad in May. "He lost a lot of his friends and the one that upset him the most is Manaf." But Assad has lost more than friends. Despite his recent military gains, the north and east of the country, including the eastern oil fields, remain out of his control.

Kurds in the north-east have enjoyed de facto autonomy for two years, much like their brethren in northern Iraq, and it is hard to see Assad ever regaining full control of a country whose Sunni majority is implacably opposed to being ruled by Assad's Alawite minority.

Assad has increasingly turned to Iran for support, evidenced by meetings with senior Iranian officials in the aftermath of a bomb attack last July that killed four of his inner circle.

Iranian money has propped up Syria's economy, while Iranian officers have helped train the Syrian army and set its counter-insurgency strategy, regional security sources say.

The Iranian-backed Lebanese movement Hezbollah was also largely responsible for Assad's forces regaining the town of Qusayr in early June.