The official Moroccan news agency says a train that derailed Tuesday was a shuttle linking the capital, Rabat, to the town of Kenitra, further north on the coast.
The MAP agency's first reports on the derailment said there were deaths and injuries but didn't have details.
MAP says the Moroccan king, Mohammed VI, has offered to pay the funeral costs for victims' families out of his own pocket.
The news agency reported that the king also instructed that the injured be treated in a military hospital in Rabat.
* Sign up to News24's top Africa news in your inbox: SUBSCRIBE TO THE HELLO AFRICA NEWSLETTER
FOLLOW News24 Africa on Twitter and Facebook.