A shuttle train linking the Moroccan capital to a town farther north on the Atlantic coast has derailed, killing at least seven people and injuring dozens, Moroccan authorities and the state news agency said.

The provisional death toll of seven came from the MAP news agency, which cited a regional health official.

Seven people were seriously hurt, according to the same report, and were at a military hospital in Rabat.

Morocco Train Derails
People gather after the derailment (Abdeljalil Bounhar/AP)

The shuttle train linking Rabat to the town of Kenitra derailed about halfway between the two, in the town of Sidi Bouknadel, near the city of Sale.

Sale deputy mayor Abdellatif Soudou said rescue workers were searching for passengers who might be trapped in the twisted wreckage of the train.

Dozens were injured in the derailment, Mr Soudou said.

The Moroccan king, Mohammed VI, offered to pay the costs of the victims’ funerals out of his own pocket, MAP reported.