Maslow reported that one legend attributes the mosque to an unidentified "Red Sultan", but that a more plausible legend attributes it to a "red woman" of the Banu Marin (Marinid) clan who came from the Tafilalt and devoted her fortune to building the mosque.