Syrian rebels launched a mortar attack on a convoy carrying Bashar al-Assad early on Thursday, which left the embattled leader unharmed but underscored how close the country's crippling civil war is edging to its seat of power.

Assad was travelling to a mosque in the Damascus suburb of Malki, where he has an office and a residence, when the attack took place in the early morning. Residents confirmed to the Guardian that at least three mortars, or small rockets, landed as his convoy arrived at the Enas bin Malik mosque for prayers to mark the beginning of the three-day Islamic festival of Eid al-Fitr.

It is not clear whether the motorcade was hit. Syria's information minister, Omran al-Zoubi, later denied any attack had taken place and said Assad was safe and well. Two rebel groups who claimed to have launched the attack said there were some casualties and damage to at least one vehicle.

Narratives have been bitterly contested throughout Syria's civil war with claims from both sides often directly contradicting each other.

Malki has remained a relatively safe district of the capital as war has raged nearby. Rebels have proved difficult to dislodge from areas in the south and west of the city that have emerged as opposition strongholds over the past year despite relentless regime counter-attacks.

From areas such as Douma, Yarmouk and Daraya, all within the city limits, a combination of Islamist and mainstream opposition groups have been able to launch attacks on areas that house security buildings and the presidential palace.

The apparent attack on Assad is thought to be the first to target high profile members of the regime since a bomb detonated in a national security building in Damascus in July 2012, where senior officials were holding a planning meeting. That attack, claimed by the opposition, killed Assad's brother-in-law, Assef Shawkat, as well as Syria's defence minister and several other key officials.

The war of attrition ever since has caused widespread destruction to some areas and prolonged disruption almost everywhere in one of the world's most tightly-controlled capitals.

In the past five months, however, loyalist forces have been on the front foot in contested parts of the capital and in the west of the country, along the so-called Alawite spine, where Assad's core support base is located. The Syrian leader and many of his inner court are members of the Alawite sect, which together with other minorities and some of Syria's majority Sunni population, form the rump of the loyalists fighting the now entrenched civil war.

The opposition is made up almost entirely of Sunnis who don't support the regime. Among their ranks are foreign jihadists who have flocked to Syria over the past 13 months and are now a powerful component of the anti-Assad forces. Large numbers of Syrians have chosen to sit out the war in neighbouring Lebanon, Turkey and Jordan, where around 1.5 million are now living as refugees. More than two million more Syrians are internally displaced.

As the jihadists have consolidated in the north and west of the country they have tested the authority of more mainstream groups and increasingly seized the initiative during raids on regime sites, such as the Minnagh Air base, near the Turkish border, which was seized on Tuesday following a nine month siege. Rebels, again led by foreign jihadists, have also advanced over the past week from encampments north of Latakia on Syria's northern coast, towards Alawite villages on the city's northern limits.

Reports from the area suggest that up to 10 Alawite villages fell during fierce fighting on Monday, the first time that opposition groups have been able to make inroads in the area in more than two years of trying.

A trickle of strategic gains such as this have partly offset the regime offensive in the west, which centres around Syria's third city, Homs. The besieged city is thought likely to fall to Syrian forces and Hezbollah, which has been at the arrowhead of recent advances. The days immediately following Eid al-Fitr are considered crucial to the fate of Homs, where a regime blockade in place for much of the past year has recently been tightened and the key opposition district of Khalediyeh fell in mid-July.

The fall of Homs would be a serious setback for the opposition, which continues to reel from the fall of Qusair on the Lebanese border to Hezbollah in late June. Syrian forces gave artillery and air cover to the operation, which marked the powerful militia's first acknowledgment of a widespread involvement in Syria's war that has has steadily taken on a regional, sectarian dimension over the past year.

Hezbollah's role has added to the Syrian military's relatively weak urban warfare capability, which senior army defectors say has limited its ability to press home its superiority in numbers and equipment and dominance of the skies.

An ambush on Wednesday morning of a large column of opposition fighters walking on a desert road towards eastern Damascus is understood to have been plotted after scouts from the Lebanese group were deployed to watch for infiltrations. Some 62 rebels were killed in a well-planned machine gun trap, with only three managing to escape.

"The Hezbollah are very active in all the areas that the regime has been blind in, or unable to advance from," said a senior Lebanese official affiliated with the group. "From now things will continue to turn in Assad's favour."

Abu Suleiman, an opposition figure in Idlib in northern Syria, said that loyalist forces had been strategically defeated in much of the north where jihadists, local clan leader and warlords now hold sway.

"Things may ebb and flow in Damascus," he said. "But here it's a new reality."