Somalia has issued a ban on Christmas celebrations in the Muslim-majority country after the Southeast Asian sultanate of Brunei announced a similar prohibition earlier this month with the threat of five years in jail.

Sheikh Mohamed Khayrow, director general of Somalia's religious affairs ministry, said on Tuesday that Christmas and New Year celebrations threatened the country's Muslim faith.

"There should be no activity at all," he told reporters, adding security forces had been ordered to break up any such festivities.

"All events related to Christmas and New Year celebrations are contrary to Islamic culture, which could damage the faith of the Muslim community."

Sheikh Nur Barud Gurhan, of the Supreme Religious Council of Somalia, also warned against celebrations, saying they could provoke al-Shabab "to carry out attacks".

Last year, the armed group launched a Christmas Day attack on the African Union's heavily fortified headquarters in the capital Mogadishu, killing three AU soldiers and a civilian.

Somalia, which issued a similar ban in 2013, follows the Islamic calendar that does not recognise January 1 as the beginning of the year.

There are almost no Christians left living in the country, although a bombed-out Italian-built Catholic cathedral remains a city landmark Mogadishu.

Foreign diplomats, aid workers, and soldiers living in the AU compound are permitted to mark the day privately.

Santa hats banned

Similarly, Brunei's Sultan Hassanal Bolkiah has also banned public celebrations of Christmas.

Religious leaders in the oil-rich sultanate warned the ban on Christmas would be strictly enforced, with violators facing up to five years in jail.

"Using religious symbols like crosses, lighting candles, putting up Christmas trees, singing religious songs, sending Christmas greetings ... are against Islamic faith," imams said in sermons published in the local press.

The government warned last year that Muslims would be committing an offence if they so much as wore "hats or clothes that resemble Santa Claus".

Christians represent about nine percent of Brunei's 430,000 population.

Businesses have been warned to take decorations down and authorities have stepped up spot checks across the capital. Hotels popular among Western tourists that once boasted dazzling lights and giant Christmas trees are now barren of festive decor.