Denmarks Supreme Court ruled that a Moroccan-born man convicted of inciting terrorism was to lose his Danish citizenship and cleared the way for his deportation.

The court said that Wednesday's verdict was the first time the country's highest court has revoked the citizenship of a naturalised Danish national on criminal grounds.

Said Mansour, 56, was sentenced in 2014 to a four-year prison term for inciting terrorism and urging support for al-Qaeda and similar groups.

Meanwhile, the statements were posted on Facebook, in emails and in three books he published.

The material took the form of CDs, DVDs, cassettes and videotapes and featured speeches, songs and films in which people connected to various terrorist groups called for waging a holy war and praised terrorists.

Mansour became a Danish citizen in 1988, five years after he came to Denmark, while he has lived on benefits since 1994.

The court ruled that his ties with Denmark were not strong enough for him to remain as four of his children were adults.

He also has a young daughter born in October 2015 after he remarried. The court noted that the couple had not lived together.

The case was elevated to the Supreme Court after a district and appellate court issued conflicting rulings on whether he could be deported or not.

The Supreme Court said that Danish migration authorities were to decide on whether he should be deported after serving his sentence.

However, Mansour's attorney, Michael Jensen said an appeal would be lodged with the European Court for Human Rights, saying the conviction violated his client's freedom of expression.