Bashar al-Assad makes his first public appearance in six weeks, attending Eid prayers at a Damascus mosque Reuters

Syria's president, Bashar al-Assad, has attended Eid prayers in a mosque in Damascus, his first appearance in public after a bombing in the Syrian capital last month that killed the defence minister and three other top security officials.

Elsewhere across Syria on Sunday, thousands held anti-government protests in mosques and cemeteries to mark Eid al-Fitr, a holiday when pious Muslims traditionally visit graves and pray for the dead.

The three-day holiday marks the end of the Muslim holy month of Ramadan, which was particularly deadly in Syria as the 18-month-old uprising reached the country's two largest cities, Damascus and Aleppo.

Amateur video posted by activists on the internet showed a large group of worshippers in a mosque at al-Zahera district in Damascus shouting: "There is no God but Allah and Assad is the enemy of God," while clapping their hands over their heads.

"May God protect the Free Syrian Army!" they also cried, referring to the main rebel group fighting to topple Assad.

Syrians also protested in many other parts of the country, demanding freedom and calling for Assad to go.

Opposition groups reported fierce artillery shelling that targeted a main cemetery in the rebel-held town of Rastan, north of the central city of Homs, as people visited the graves of dead relatives, but the reports could not be independently confirmed.

The Britain-based Syrian Observatory for Human Rights said one woman was killed in the shelling on Rastan.

Meanwhile, Syrian state TV broadcast footage showing Assad praying at the city's Rihab al-Hamad mosque, a relatively small mosque in al-Muhajireen district only a few hundred metres from the presidential palace, to mark the start of Eid.

Residents of Damascus said security forces blocked streets and encircled several central mosques in the capital on Saturday evening, possibly to confuse people about where Assad would attend the traditional holiday prayers.

Unlike previous years, Assad was not shown arriving or leaving in his convoy – only seated on the mosque floor, wearing a suit and tie, and later, standing and briefly shaking hands with officials.

"All this points to a state of confusion and lack of confidence at the leadership level," said Syria-based activist Mohammad Saeed. "It shows they don't have security in the capital under control."

The last time Assad appeared in public was on 4 July, when he gave a speech in parliament.

Since then, there has been a sharp escalation in the civil war with almost daily fighting in some districts of the capital between security forces and rebels seeking to topple Assad.

The Syrian regime has suffered a series of setbacks over the past month that point to a loosening of its grip on the country.

The 18 July rebel bombing of the state security headquarters in the capital was a major blow to Assad. His brother-in-law was among the four officials killed.

There has also been a steady stream of high-level defections by government officials, diplomats and generals, though Assad's inner-circle and military have largely kept their cohesive stance behind him. And the regime has been unable to fully subdue rebel challenges in the two major cities, Damascus and Aleppo.

Assad's appearance comes amid much speculation on the whereabouts of Syria's vice president, Farouk al-Sharaa, who was said by some members of the Free Syrian Army to have defected to the opposition. On Saturday, his office denied the reports and said Sharaa "did not think, at any moment, of leaving the country".

Sharaa did not appear in the footage at the mosque with Assad, but observers note the two rarely attend the same functions for security reasons.