This shrine is an urban complex built around the mausoleum of Moulay Idris II (r. 803-828), son of the founder of the Idrisid dynasty. It was the most influential religious and intellectual center until the construction of the Qarawiyyin Mosque. The currently extant mosque was built ca. 1824/1240 AH, and major renovations were carried out in 1890/1308 AH.
Among the most historically significant parts of the complex are Dar al-Qaytun (House of the Tent), the house in which Mulay Idiris I is believed to have lived when the the city of Fes was established; and the Al-'Ashraf Mosque (Mosque of the Nobles). The shrine has been an important pilgrimage destination and locale for civic ceremonies since at least the 14th c/8th c. AH.
Sources:
Mezzine, Mohamed. "Mulay Idris Mausoleum." Laurence Nunny, Trans. Discover Islamic Art – Virtual Museum. Accessed January 30, 2016. http://www.discoverislamicart.org/database_item.php?id=monument%3BISL%3Bma%3BMon01%3B20%3Ben&pageD=N.
Parker, Richard. 1981. A Practical Guide to Islamic Monuments in Morocco. Charlottesville: Baraka Press, 133-134.