The 24 were brought to the court in the coast city of Sale in armored vehicles and did not speak at the hearing, which focused on pleas from lawyers. They include the four men accused of the killing itself and others suspected of links to the attack or the attackers.
The trial of the killing of 24-year-old Louisa Vesterager Jespersen of Denmark and 28-year-old Maren Ueland of Norway is expected to run for months, according to Hafida Makssaoui, the government-appointed lawyer representing the four chief suspects.
She told The Associated Press that her clients, aged 25-30, have pleaded guilty and regret their actions. However she expects they will get a death sentence over the December attack
The suspected attackers' leader, Abdessamad Ejjoud, was arrested when preparing to join so-called Islamic State in Syria, Iraq and Libya. His lawyer said he also had links to extremist group Boko Haram in West Africa and was trying to recruit Sub-Saharan migrants in Morocco.
Khalid El Fataoui, the lawyer representing the family of the Danish victim, says the family intends to seek material compensation from the Moroccan state because the suspects do not have the means to pay damages.
The court decided to include the Moroccan government as a civil party to the case.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.