Stop 2 of 7

Moulay al-Yazid Mosque

مسجد القصبة / مسجد مولاي اليزيد

This stop will show how a religious oath turned a struggle for the throne into a lawful change of sultan.

10 min
Moulay al-Yazid Mosque in the Kasbah of Marrakech
Jorge Franganillo · CC BY 2.0; cropped/resized for app
1234567

0 of 7 done

Audio guide · recorded voiceListen to the place’s story

Look around first

What to notice

  • Minaret
  • Eastern façade
  • Square in front of the mosque
  • Southern wall

The story of the place

Text size

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

Time at the stop10 min
Next stopSaadian Tombs
Entranceoutside

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.

Next step

Where to next

Follow the mosque's right-hand wall to the inconspicuous passage into the necropolis.

Stop 2 of 7Next: Saadian Tombs

Route completed

Walk completed

“Kasbah of Marrakech: Palaces and Power” — 7 stops, about 2.8 km, 2.5–3 hours.

No App Store or Google Play

Guide On Map installs like an app

An icon appears on your home screen, the site opens without browser chrome, and downloaded routes stay handy.

Android · Chrome
  1. If “Install now” is below, tap it and confirm the install.
  2. If there is no button: menu ⋮ → “Install app”.
iPhone · Safari
  1. Tap the Share button at the bottom of Safari.
  2. Choose “Add to Home Screen”, then “Add”.
Home-screen iconFullscreen modeOffline routesWalk progress