There was probably a burial ground behind the royal palace before the Saadian period, but the earliest tomb here dates from 1557, and the main structures were built under Sultan Ahmed el Mansour, around the same time as the Ben Youssef Medersa and the El Badi Palace. A few prominent Marrakshis continued to be buried in the mausoleums after Saadian times: the last, in 1792, was the “mad sultan”, Moulay Yazid, whose 22-month reign was one of the most violent and sadistic in the nation’s history. Named as the successor to Sidi Mohammed, Moulay Yazid threw himself into a series of revolts against his father, waged an inconclusive war with Spain, and brutally suppressed a Marrakesh-based rebellion in support of his brother. A massacre followed his capture of the city, though he had little time to celebrate his victory – a bullet in the head during a rebel counterattack killed him soon after.
The tombs escaped plundering by the rapacious Alaouite sultan Moulay Ismail, probably because he feared bad luck if he desecrated them. Instead, he blocked all access bar an obscure entrance from the Kasbah Mosque. The tombs lay half-ruined and half-forgotten until they were rediscovered by a French aerial survey in 1917, and a passageway was built to give access to them.