Mehdya, also Mehdia or Mehedya, is a town in Kénitra Province, Rabat-Salé-Kénitra, in north-western Morocco. Previously called al-Ma'mura, it was known as São João da Mamora under 16th century Portuguese occupation, or as La Mamora under 17th century Spanish occupation.