FROM the presidential palace on a hill above Damascus, the outlook seems rosier of late, despite the vista of flattened suburbs and the rumbling of bombs and mortars below. Defections from the army have stopped. American and European calls for Mr Assad to step down have grown quieter since August 2013, when America shrank from its threat to bomb the regime for using chemical weapons. Now America is leading a coalition to bomb Mr Assad’s foes, the jihadists calling themselves Islamic State (IS). It is vindication, reckons Mr Assad, of his long-held claim to be fighting dangerous terrorists rather than his own citizens demanding change.

What’s more, American strikes may be inadvertently allowing Mr Assad to concentrate on crushing mainstream rebels. The Syrian Observatory, a British-based monitoring group, reckons the regime carried out 40 air strikes (from both jets and helicopters dropping barrel-bombs) in the provinces of Hama and Idleb on October 13th, double the usual daily number of 13-20 attacks (see map).

That the mainstream rebels were not invited to the meeting of the international coalition fighting IS on October 14th (see article) suggests America does not regard them as credible military partners, even though it has pledged to train and equip some of them. “President Assad and the people around him never doubted they would win...For them the war was an aggression from outside,” says Lakhdar Brahimi, the former UN envoy to Syria.

Yet the regime may be more fragile than it thinks. Discontent has been rising, even among Mr Assad’s fellow Alawites (a Shia offshoot) who dominate Syria’s security forces. When a suicide bomb attack on October 1st killed scores of children outside a school in Akrameh, an Alawite neighbourhood of Homs, funeral-goers chanted “The people want the fall of Barazi”, a reference to the city’s governor, Talal Barazi. It was an echo of a slogan used by the opposition.

In Latakia and Tartus, two coastal cities near the Alawite heartland, posters of missing soldiers adorn the walls. When IS took over four regime bases in the east of the country this summer, slaughtering dozens of soldiers and displaying some of their heads on spikes in Raqqa, IS’s stronghold, families started to lose faith in the regime. A visitor to the region reports hearing one man complain: “We’re running out of sons to give them.” There were also denunciations on Facebook of extravagance in wartime after Wael Halqi, Syria’s prime minister, opened a new 30,000-square-metre shopping centre in Tartus that reportedly cost $52m.

Another weak spot for Mr Assad is the economy. Before the war government revenue came from oil and taxes on a diversified economic base of industry, tourism and agriculture. Most of these sources have dried up, while foreign reserves of $18 billion before the war are believed to have been depleted. The regime is struggling to produce enough electricity, even though it now has fewer Syrians to provide for. It can afford to pay soldiers, militiamen and civil servants only thanks to funds from Iran, supplemented by shady dealings with well-connected businessmen.

For the most part, though, Mr Assad’s supporters have nowhere else to turn. Beyond Alawites, they include Christians, other minorities, and Sunnis who have benefited from the regime. Mainstream rebels, not to mention IS, scarcely offer reassurance about their future in Syria.

The changing international context may be more of a danger. Though Mr Assad does not see Barack Obama as a direct threat for the time being, the strikes have nevertheless unsettled his supporters. Loyalist militiamen are angered by Mr Assad’s claim that his regime is co-ordinating with America in the fight against IS, given that he had originally blamed the conflict on an international conspiracy by the same countries now fighting the jihadists. For those who doubt that, the regime’s lack of response to unauthorised air strikes on their land is a humiliation. Another factor is pressure from Turkey—unsuccessful so far—for the creation of a buffer zone on the other side of its border with Syria to provide a haven for some of the 3m refugees and, no doubt, create a base from which rebels could challenge the regime.

The key to Damascus may well lie in Iran, which has hinted that it seeks mainly to protect its interests in Syria—including the supply-route to Hizbullah, the Iranian-backed Shia militia in Lebanon—rather than Mr Assad himself. In contrast with Iraq, where Iran helped unseat the former prime minister, Nuri al-Maliki, the clerical regime in Tehran continues to prop up Mr Assad. Some analysts think Iran may yet reconsider this policy. Two things in particular might lead to a change of heart: first, the rise of IS may favour co-operation with Sunni states such as Saudi Arabia, which funds much of the opposition; second, the falling price of oil, together with Western sanctions, is straining the Iranian budget.

The contours of a settlement have long been clear—a transitional government and security forces that incorporate more of the Sunni opposition, with Mr Assad in a purely ceremonial role. Yet the likelihood of a deal remain slim. “What we have now are only war plans,” says Mr Brahimi. “There is no peace plan.” The Turks and Saudis continue to demand that Mr Assad go. Iranian and Russian diplomats say they have little influence over Mr Assad, who has pledged to fight until the end.

Some figures close to the Syrian government predict a breakdown of the regime. “I don’t see the current situation as sustainable,” says one. “I think Damascus will collapse at some point. When? I don’t know. Then there will be chaos that makes the current war look like nothing.”