Denmark's Supreme Court stripped the citizenship from Said Mansour, a Danish-Moroccan bookseller jailed for inciting terrorism, upholding the verdict of a lower court and potentially paving the way for his deportation to Morocco.

Mansour, also known as the "Bookseller from Brønshøj" for his work in publishing controversial texts, is the first person to be stripped of Danish citizenship owing to a crime.

In 2013, he was arrested and put on trial for posting on Facebook texts and photos praising Osama bin Laden and calling on his followers to join the al-Qaeda-affiliated al-Nusra Front. He was also accused of helping to publish books by Abu Qatada, a Jordanian cleric who was deported from Britain for trial at home.

The 56-year-old bookseller moved to Denmark in 1983 and gained citizenship in 1988. He was previously convicted in another trial in 2007 on similar charges and served three-and-half-years in jail.

INTERACTIVE: Outsourcing terror

One of the witnesses against Mansour was Danish Muslim convert turned secret agent Morten Storm, who in 2012 revealed that he had been working with the Danish intelligence agency PET and the CIA.

A 2015 Al Jazeera investigation revealed the stories of three Danish Muslim men who alleged torture and imprisonment in Lebanon after refusing to work as informants for PET.

Storm was sent by the Danish intelligence to Lebanon around the time when two of the men were detained by the Lebanese authorities. Both Denmark and Lebanon denied the allegations.

Mansour to appeal

Mansour, who has retained his Moroccan citizenship, has argued that if he gets deported to Morocco, he will face torture and appealed against the decision of a lower court to strip him of his citizenship in 2015.

His defence lawyer told Danish television that Mansour would appeal to the European Court of Human Rights.

"He [Mansour] has a big connection to Denmark due to his long residence in the country, and his children and grandchildren are in the country," the lawyer said.

"And finally, he has been punished for mere statements, not actions."

Denmark's high court took the initial decision to strip Mansour of his Danish citizenship last July, in the first case of its kind in the country. He appealed against that ruling, arguing that he would face torture if returned to Morocco.

It was not immediately clear after the Supreme Court's ruling on Wednesday whether he would serve out the remainder of his jail term or be deported immediately to Morocco.

Denmark introduced the ability to strip Danish nationals of citizenship after the 9/11 attacks. The Nationality Act was amended to make it possible to deny convicted terrorists Danish citizenship.

Source: Al Jazeera and agencies