By Laila Bassam and Tom Perry

QALAMOUN MOUNTAINS, Syria/BEIRUT (Reuters) - When Lebanon's Hezbollah first joined Syria's war on the side of President Bashar al-Assad, its role was a closely guarded secret. Today, as Hezbollah plants its flag in land won from rebels north of Damascus, its role could hardly be more public.

And for Syria's increasingly embattled president, Hezbollah's help is more critical than ever.

In the last week, the Iranian-backed guerrilla group has unleashed its powerful arsenal to drive insurgents from wide areas of the Qalamoun mountain range, a short drive from Assad's seat of power in Damascus.

"We have secured 300 square kilometers between Syria and Lebanon," the Hezbollah commander leading the operation told journalists during a trip to the area on Friday, as dozens of fighters in desert fatigues combed the barren landscape.

Hezbollah's yellow flag fluttered from nearby hilltops seized from fighters identified as members of al Qaeda's Syrian arm, the Nusra Front. "It takes a while for the boys to clear the area because there are lots of mines," the commander said.

The offensive, a joint operation with the Syrian army, is one bright spot for the Syrian leader. Over the past two months Assad has lost more of his country to a patchwork of groups that include Islamic State, which is also on the march in neighboring Iraq.

For Assad, it has been one of the toughest spells since the first year or two of the conflict that spiraled out of an uprising against his rule during the 2011 "Arab Spring".

He has lost big areas of Idlib province to an alliance of Sunni Islamist insurgents who are widely assumed to have received more support from Saudi Arabia, Turkey and Qatar - regional states that want Assad gone from power.

Insurgents have edged dangerously close to the northwestern coastal areas that form the heartland of the minority Alawite sect to which Assad belongs. The Syrian army and allied militia are sending reinforcements to fight back.

Story continues

In the south, he has also lost ground to rebels including mainstream groups that are proving more potent and organized.

Meanwhile, the Islamic State jihadist group has added to the pressure by attacking government-held areas in central Syria. Its most recent attack was on ancient Palmyra.

HEZBOLLAH FIGHTS IN NEW AREAS

Noting that "the situation is trending less favorably for the regime", a top U.S. military officer said on May 8 he would look to the negotiating table if he were in Assad's shoes.

Yet the setbacks do not appear to have forced a change in strategy on the part of Assad or his most important allies, Iran and Russia.

Tehran is heavily invested in a conflict that is a focal point of its struggle with the conservative Sunni monarchy of Saudi Arabia. Iranian resolve seems as firm as ever.

Hezbollah, set up by Iran's Revolutionary Guards in 1982, is today fighting in parts of Syria where it had not previously deployed, its leader, Sayyed Hasssan Nasrallah, said on May 5.

Salem Zahran, a Lebanese pundit close to the group, says these include the northwestern province of Idlib, where Assad lost an entire city in late March. Assad says Turkish support for the rebels was the main factor in the fall of the city.

Zahran said Damascus had responded by "drawing on its friends more".

"The regime has become completely invested in the decision of partnering with Hezbollah," he said.

Syrian state TV, in its coverage of the Qalamoun fighting, has for the first time credited Hezbollah for its role.

From Iran, there have been renewed statements of support for Damascus. A senior Iranian official used a trip to Damascus last week to launch a blistering attack on Saudi Arabia. Reports of new Iranian financial support have helped the Syrian currency strengthen from record lows it touched after the fall of Idlib.

Assad received another Iranian official on Monday to discuss bilateral economic relations.

Rustom Qasemi, head of a body tasked with developing Syrian-Iranian economic ties, said Iran would "not spare any effort in the economic sphere that allows Syrians to fortify their strength," the state news agency SANA said.

The Syrian war has been a strain on both Iran and Hezbollah: Tehran has spent billions supporting Assad economically and militarily. Hezbollah, with a fighting force estimated to number many thousands, has been burying a steady flow of fighters killed in Syria. The group says 13 have been killed in Qalamoun.

REBELS PLAN ALEPPO OFFENSIVE

For Assad's opponents, the support from Iran and Hezbollah is a sign of his weakness, not strength. They claim he has lost control to his allies, or at least appears ever more dependent on them.

Opposition reports say it was divisions over the extent of Iranian influence over fighting earlier this year in southern Syria that led to the demise of Syrian official Rustom Ghazali. His death in unclear circumstances was announced in April.

Sources close to the government dismiss as nonsense the idea of any differences over strategy in a Syrian administration where they say power is still concentrated in Assad's hands.

Issam al-Rayyes, spokesman for the "Southern Front" alliance of mainstream rebels in southern Syria, says their battle is now against Iranian influence. "We expect more (rebel) progress. But we can't forget that the militias that are supporting Assad have not yet given up on him," Rayyes said.

In the north, the alliance of insurgent groups that successfully took Idlib city and the nearby town of Jisr al-Shughour have set up a joint operations room aimed at taking the government-held part of Aleppo.

That marks a dramatic shift in momentum from February, when the Syrian army and allied militia launched a big push to encircle the insurgent-held side of the divided city.

The Syrian military and allied militia appear not to be making quick progress in recovering lost areas of Idlib. Diplomats say the northern rebels appear to be in possession of greater quantities of anti-tank weapons.

There are foreigners on both sides. Central Asians are among the foreign jihadists fighting against Assad's government, whose dominance of the skies still gives it a critical advantage.

Zahran said Assad's priority was to secure Damascus, "then the Damascus countryside, then Aleppo ... because the regime feels that the Turks are serious in taking control of Aleppo".

"The regime feels that Idlib is not the goal, but a bridge to reach Aleppo".

Despite the setbacks for Assad, Western diplomats are cautious about forecasting the end of a leader who has consistently defied forecasts of his demise in the four-year-long war.

Indeed, Assad may have capitalized on the crisis to galvanize some foreign backing: "The regime's attempt to hold together the alliance behind Assad seems to have borne the desired fruit," one Western diplomat said.

But Assad has not been able to convince Western governments including the United States they should engage him as a partner in the fight against Islamic State. A U.S. special forces raid against Islamic State in eastern Syria was carried out without consulting Damascus.

(Additional reporting by Dan Williams in Tel Aviv; Writing by Tom Perry; Editing by Janet McBride and Peter Graff)