DAMASCUS, Syria -- Syrian President Bashar Assad made a rare visit to the front line of his country's civil war, spending New Year's Eve with his troops in a tense eastern Damascus neighbourhood, state media said Thursday.

State TV footage showed Assad having dinner of baked beans and boiled potatoes with soldiers and pro-government militiamen Wednesday night in the Jobar neighbourhood, which has seen intense fighting in recent months between troops and opposition fighters.

"On New Year's Eve families gather, but you decided to be here to protect your country," Assad told the troops as sporadic gunfire echoed in the background. "I like to be with you on this occasion."

Assad described rebels who use underground tunnels as "rats," adding that "we fight them above the ground."

The footage, aired Thursday, showed Assad shaking hands and kissing cheeks, surveying fortifications and climbing onto a tank.

Syrian troops have been fighting rebels in Jobar since 2013, and state media says government forces have been advancing recently.

Assad's visit came as rebels fired nearly two dozen mortar shells on Damascus, residents said. It was not clear if there were casualties.

Assad has rarely appeared in public since the uprising against his family's four-decade rule began in March 2011 with peaceful protests. The government's brutal crackdown led to the rise of an armed opposition, and today the country is in the grip of an increasingly complex civil war that has claimed more than 200,000 lives and shows no sign of abating.

On Thursday, the Britain-based Syrian Observatory for Human Rights said 76,021 people were killed in 2014, including about 17,800 civilians. The group, which has a network of activists around the country, said the dead included some 22,600 troops and pro-government fighters.

Assad was last seen in public on April 20, 2014 when state TV broadcast images of him visiting the Christian hamlet Maaloula north of Damascus after government forces retook the town.