Abdelhafid of Morocco (Arabic: عبد الحفيظ بن الحسن العلوي‎) or Mulai Abdelhafid (24 February 1875, in Fes– 4 April 1937, in Enghien-les-Bains) (Arabic: عبد الحفيظ‎) was the Sultan of Morocco from 1908 to 1912 and a member of the Alaouite Dynasty. His younger brother, Abdelaziz of Morocco, preceded him. While Mulai Abdelhafid initially opposed his brother for giving some concessions to foreign powers, he himself became increasingly backed by the French and finally signed the protectorate treaty giving de facto control of the country to France.

Under his rule, government critics were harshly persecuted. Muhammad al-Kattani, an influential Sufi poet and activist, was captured, tortured and beaten to death in front of his wives and children in 1909. Lalla Batou, a supported of Abdelaziz, was tortured. She was chained to the wall in a crucifiction position, completely naked with her breasts seized in a vice, and whipped and interrogated about the whereabouts of her husband's fortune under the direct supervision of Abdelhafid.

After signing Morocco over to the French, he was forced to abdicate and went into exile.