Fierce clashes broke out in the Syrian capital on Sunday after insurgents infiltrated government-held parts of the city through tunnels overnight in a rare advance after months of steady losses elsewhere in the country.

It was a surprising breach of the security perimeter in Damascus, where the government has effectively walled itself off from opposition forces encamped in two enclaves in the eastern parts of the city.

Bashar al-Assad’s government has endeavoured to maintain a veneer of normality in the capital as his forces bomb opposition areas on the edges and suburbs of the city.

Residents said artillery shells and rockets had landed in the heart of the city. Damascus Today, a Facebook group run by activists, reported government airstrikes in the area where the clashes took place.

Government infantry and tank reinforcements arrived to repel the attackers in the afternoon, the group said.

With its military depleted after six years of fighting and defections, the Syrian government relies on a blend of official and semi-official forces to defend its territory, including Shia militias from Iran, Iraq, Lebanon and other Middle Eastern countries.

The clashes centred on a government-held gap between two besieged opposition enclaves, the Jobar and Qaboun neighbourhoods. The ultraconservative Ahrar al-Sham rebel faction said fighters had liberated the area.

The Levant Liberation Committee (LLC), a group linked to al-Qaida, and the independent Failaq al-Rahman faction also participated in the attack.

Syrian state media said the military had repelled an attack by a group linked to al-Qaida after “terrorists” infiltrated through tunnels in the middle of the night.

Rebels detonated two large car bombs at 5:20am on Sunday close to Jobar. The LLC claimed responsibility for the attack.

The government has been trying to pressure the rebels to surrender the pockets they still hold in Damascus following victories in the northern city of Aleppo, the central city of Homs and other Damascus suburbs.

Tens of thousands of fighters, dissidents and their family members in long-besieged areas have accepted exile to the country’s rebel-held north-west in what opposition figures have termed forced displacement.

A UN inquiry into the battle for Aleppo last year concluded that all sides had committed war crimes, including the government’s siege and punishment strategy, a tactic continues to produce results.

In Aleppo, Syrian government forces back by Russia laid waste to the eastern half of the city, while a food and medical blockade pushed health conditions to the brink. Rebels capitulated in December, and more than 20,000 residents left the city, saying they could not trust government assurances of their safety.

Residents of the opposition-held al-Waer neighbourhood of Homs began evacuating the city on Saturday after years of siege and bombardment. The evacuations are expected to continue for weeks, until the government claims control over the whole city for the first time since demonstrations broke out against Assad in 2011.

Government forces have besieged Jobar since 2013.

In Idlib province, at least nine civilians were killed in what activists said were government airstrikes.

The Civil Defense search-and-rescue group said three children and a woman had been killed in an airstrike on the village of Khan Shaykhun, and the UK-based Syrian Observatory for Human Rights reported another five people had been killed in the provincial capital.

Footage from the Edlib media centre, which is run by activists, showed paramedics working to dig victims out of the rubble.