The accused, who were sentenced on Friday, had all been charged before the criminal chamber of the court of appeal with "forming a criminal gang with the aim of planning and committing terrorist actions", the Moroccan news agency MAP reported on Saturday.
This court in the north African kingdom is considered competent to try alleged terrorist offences and the defendants were brought before it after separate cases in which they were involved were heard the same day.
In one group of nine suspects, a 15-year jail term was given to Hasan al-Zaituni. Seven other defendants were jailed for 10 years and the eighth for two years.
Another 15-year sentence was passed on Muhammad Sghir Sussi, while a fellow defendant was sent to prison for 10 years, on the same charges, MAP reported.
Trials go on
Five other people were given jail terms of between two and six years. The news agency gave no details of the nature of the offences or the criminal groups concerned.
A large number of trials, mainly of Moroccan Muslim hardliners, have taken place and continue to do so in the country's large towns since a wave of bomb attacks in Casablanca on 16 May.
Forty-five people, including 12 bombers, were killed
that day in five nearly simultaneous attacks on Jewish and foreign targets in the north African port city on the Atlantic.