Arrested ahead of the Casablanca attacks on 16 May, the ten were among the 31 alleged members of the Salafia Jihadia standing trial on various charges including murder.
The Casablanca appeals court also sentenced eight others to life in prison. Seven were sentenced to 20 years in jail, five to 10 years and one person to a one year.
Their trial had assumed prominence particularly after the 16 May suicide bombings in Casablanca that killed 44 people.
Their suspected leader, Yussef Fikri, who admitted in court of having "killed enemies of God", was among those sentenced to death.
The local media describes Fikri as the "Emir of Blood".
Also, given the death penalty was Mohamed Damir, said to be Fakir’s second in command.
But the convicted ten stayed defiant even as their sentences were read out.
They chanted "Allahu Akbar" (God is greater), drowning the judge’s voice.
Eleven of those on trial were accused of committing murders in the past two years, including of a Casablanca policeman.
Defense lawyers had complained during the trial of procedural irregularities, imprecise information in police files and lack of irrefutable proof.
The ten have eight days to appeal against their sentences.