Maghreb Arab Press (MAP) has reported that the authorities found the bodies after the sea washed them onto the beach.
The migrants, including one woman, attempted to reach Europe from Morocco via an inflatable boat.
Authorities also found three survivors, who were unconscious
Security services transferred the rescued survivors to the Mohammedia Provincial Hospital for necessary medical care.
Moroccan emergency services also deployed search operations to find other potential survivors from the boat-wreck.
Police opened an investigation to determine the circumstances of the case and to arrest the irregular migration network that organized the operation.
In recent years, Morocco has been facing pressure of irregular migration due to the increase of the number of undocumented migrants seeking to use Morocco as a transit country to reach Europe.
Last month, Morocco’s spokesperson of the government Mustapha El Khalfi said that security services aborted 57,000 irregular migration attempts in 2019.
The official added that Moroccan police also managed to dismantle 100 irregular migration networks.
Morocco’s government has long called for a shared responsibility with Spain to tackle border migration crisis.
In August, director of migration and border surveillance at Morocco’s Ministry of Interior Khalid Zerouali said in an interview with El Diario that “border security is the responsibility of all countries, all countries must contribute to make the fight against cross-border crime an effective fight.”