Look around first
What to notice
- Minaret
- Eastern façade
- Square in front of the mosque
- Southern wall
The story of the place
On the sixteenth of August, nineteen oh seven, the city judge, theologians, and commanders drew up two documents in this mosque. In the first, they declared the reigning sultan, Abd al-Aziz, deposed. In the second, they recognized his elder brother, Abd al-Hafid—the governor of Marrakech, who was seeking the throne—as sultan.
They chose the kasbah's main Friday mosque for this procedure. Caliph Yaqub al-Mansur ordered it built between eleven eighty-five and eleven ninety for the new palace quarter. The ruler himself came here for communal prayer, while in the square by the eastern wall, townspeople received the sultan's processions. Here, the claimant's name could be entered into a written bay'a—an oath after which those who signed recognized him as the lawful ruler.
Abd al-Hafid took advantage of his brother's defeats. In the spring of nineteen oh seven, French troops occupied Oujda; in the summer, the French fleet shelled Casablanca. Abd al-Aziz was accused of allowing European control over Moroccan finances and police to expand. The governor of Marrakech promised to resist it, but a promise alone was not enough to gain the throne. He needed people able to bring armed detachments and force the cities to recognize the new oath.
The chief organizer was Madani al-Glaoui, leader of the Glaoui mountain tribal confederation. His income came from a salt mine in Telouet, taxes from the tribes under his authority, and levies on caravans crossing a pass in the High Atlas. The expanding uprisings threatened to deprive the southern commanders of these incomes and lands. Madani placed his men and his fortune behind Abd al-Hafid, then brought to the mosque those whose signatures turned a conspiracy into an open change of ruler.
The Marrakech oath did not yet give Abd al-Hafid the entire country. Fez recognized him later, setting its own conditions, and the supporters of the two brothers fought for another year. On the nineteenth of August, nineteen oh eight, Abd al-Aziz's army was defeated on the approaches to Marrakech. He abdicated the throne. Abd al-Hafid appointed Madani first minister of war, then grand vizier—the head of the sultan's government. In March nineteen twelve, the sultan proclaimed here as an opponent of foreign intervention signed the Treaty of Fez establishing the French protectorate. A few months later, he too abdicated.
The mosque's present name refers to another man. “Moulay” is an honorary title for a member of the ruling family, and Moulay al-Yazid was an Alaouite sultan who ruled from seventeen ninety to seventeen ninety-two. The building, constructed six centuries before him, was previously called the kasbah mosque, the palace mosque, and al-Mansur Mosque. The name al-Yazid became attached to it in the Alaouite era. This sultan's tomb lies immediately beyond the southern wall, in the adjoining necropolis; the square by the eastern façade received its name from the mosque only later.
After the earthquake of twenty twenty-three, the building remained closed for almost three years. On the seventeenth of July, twenty twenty-six, the restored mosque reopened to worshippers—for Friday prayer.
Useful on site
Active mosque; the route is designed for an exterior visit.
Checked: June 28, 2026. Check the official source before visiting.Listen to the story from outside, and treat the square as the space of an active mosque, not a museum courtyard.
