A court in Morocco has sentenced to death the man believed to be behind a deadly April bombing of a cafe in Marrakesh.

The Rabat court convicted Adel Othmani of spearheading the attack on the Argana cafe, a blast which killed 17 people, most of whom were foreign tourists, including eight French citizens.

Prosecutors alleged that Othmani masqueraded himself as a guitar-playing hippie while planting two bombs in a café and then detonating the explosives with a mobile phone.

Eight of Othmani’s accomplices received prison terms ranging from two to four years in connection with the bombing, which was the deadliest attack in Morocco since suicide bombers killed 45 people in Casablanca in 2003.

Othmani’s motives were unclear, although Moroccan authorities suspect he might have been an admirer of al-Qaeda. However, according to Reuters, local affiliates of the terror group denied having any connection with the condemned man.

From the very beginning Othmani denied the charges, accusing the courts and police of seeking to frame him.

The whole affair is baseless. There is so much injustice in this country. Innocent people find themselves embroiled in cases like this while they are actually being used in political ploys, he reportedly told the judge after sentencing.

Othmani’s attorneys said they will file an appeal.

BBC reported that there are more than 100 people languishing on death row in Morocco, but no executions have been recorded in the kingdom in almost two decades.