At least seven people were killed and about 80 injured when a train was derailed near the Moroccan capital Rabat on Tuesday morning, a medical source said.