Morocco train driver charged with involuntary homicide over crash
The driver - who faces five years in prison on charges that also cover injuring people - has been referred to a court in the town of Sale near the capital Rabat, and will appear under arrest, the Sale prosecutor added.
The "excessive" speed of the train, which was travelling at 158 kilometres (98 miles) per hour instead of the 60 kilometres per hour limit, caused its derailment, the prosecutor said.
The high casualty toll, spectacular images of the derailment and an initial silence by national rail company ONCF in the first few hours after the accident caused anger in Morocco.
Seven of those hurt received serious injuries and a Frenchman was among those who died in the 16 October accident around 20 kilometres (12 miles) north of Rabat.
King Mohammed VI said he would pay for the burial costs of the victims and for the treatment of the injured, who were taken to Rabat's military hospital, according to a royal cabinet statement.
The crash is not the first train incident in Morocco this year.
In February, a freight and passenger train collided, leaving at least six dead and 14 wounded near Beni Makada district.
In 2014, Abdellah Baha, Morocco's minister of state and deputy secretary-general of the Islamist Justice and Development Party at the time, was killed after being struck by a train in the Bouznika neighbourhood of Rabat.
Rail and automotive safety remain a pressing issue across much of the Middle East and North Africa.
Follow us on Twitter: @The_NewArab