Demonstrators in Damascus carry pictures of Hizbullah leader, Hassan Nasrallah, and Syrian president, Bashar al-Assad. Photograph: Bassem Tellawi/AP
The Bakdash ice-cream parlour is one of the great institutions of old Damascus, established in 1895 and renowned throughout the city. Among the more distinguished visitors to have sampled its produce is the king of Jordan, whose photo hangs prominently on the wall.

Hassan Nasrallah, the leader of Hizbullah, may be too busy just now to drop in for a pistachio-sprinkled cornet but his photo has recently joined that of the king. Interspersed between the elegant chandeliers hanging from Bakdash's ceiling, meanwhile, are images of a fist clasping a rifle: the yellow-and-green flags of the Lebanese Shia movement.

In a street around the corner, the owner of a jewellery shop also sings the praises of Hizbullah. He's an Armenian Christian, but that makes little difference. "It's the first time that Arabs hit Haifa," he says.

Reaching for a scrap of paper, he draws a rough map of the Syrian-Lebanese-Israeli border and points to the Shebaa Farms, the tiny patch of land claimed by Lebanon but still occupied by Israel.

"Five km, 10km - what does it matter? Give it back, sign an agreement. Finished!"

Less than three weeks into the war in Lebanon, Hizbullah's standing is rising dramatically among the Arab public. The reasoning in Damascus is that, short of annihilating Lebanon's Shia population, Hizbullah cannot be destroyed. At some point, the argument goes, Israel will have to back off and Hizbullah will claim victory for having survived the onslaught.

In anticipation of this, the Syrian regime, while trying to stay out of the conflict itself, is seeking to bask in Hizbullah's glory. Posters on sale in the streets, and displayed in the back of car windows, depict President Bashar al-Assad shoulder to shoulder with Hassan Nasrallah.

"Syria doesn't have to do very much to be potentially in a position to gain," said one western diplomat in Damascus.

After years of international isolation, the regime is acquiring leverage again through its ties with Hizbullah, though political analyst Sami Moubayed doubts Syria can impose its will on the Lebanese Shia if acting on its own.

"Only with Syrian-Iranian support can this war come to an end," he said. "Bringing Syria alone into talks will not end it."

Damascus would also expect rewards for its help, he added. "The Syrians need carrots - big carrots." Among these would be a resumption of talks about the Israeli-occupied Golan Heights and the lifting of US-imposed sanctions.

Internally, meanwhile, after a sticky period following the assassination of former Lebanese prime minister Rafik Hariri and the reluctant withdrawal of its troops from Lebanon, the Syrian regime looks far more secure. People have rallied round in support of a popular cause and reformists are once again in the wilderness.

"The Syrian opposition will be silenced by growing dislike of the United States," Damascus-based commentator Joshua Landis wrote in his blog. "Syrians are less likely to trust the proposals for democratic or pro-western change being put forward by the opposition. A month ago there was considerable attention being paid to Assad's crackdown on the opposition. Not today."

Another result of the war is that despite international efforts last year to end Syrian hegemony over Lebanon, Israeli bombing is driving the two countries together again.

"Lebanon needs Syria more than ever," Mr Landis wrote. "It needs Syria to be kind to the many refugees who have found protection and safety in Syria. The Lebanese economy will be increasingly vulnerable to Syrian pressure."

In the eyes of many Syrians, this simply proves that President Assad was right all along when he predicted the Lebanese would regret casting off the protection of their larger neighbour. His prophecy that without Syrian troops Lebanon would once again descend into civil war has not yet been fulfilled, though some Lebanese fear it may if Israeli attacks continue.

Ultimately, the Damascus regime may emerge as the war's real winner, but the stakes are high and so are the risks, especially the risk of being drawn into direct conflict with Israel. In the last few days, Israeli warplanes have been probing Syrian airspace and Syrian forces responded - as they always do in such a situation - with anti-aircraft fire.

A week ago Syria quietly raised its military alert to the highest level and cancelled all leave. All units are at full strength, contingency plans are in place, and troops and equipment have been dispersed in what one diplomat called a defensive posture.

"They are being very careful not to be provocative," the diplomat said, though he thought there was still a 20% to 30% chance that unforeseen events might drag Syria into the war.