The kasbah of Meknes was first created on this site by the Marinid sultan Abu Yusuf Ya'qub in 1276 CE; the same year that the citadel of Fes el-Jdid was built in nearby Fes as the new capital of the Marinid empire.[6][7] (Though some sources also cite a kasbah existing near or on the site of Place el-Hedim since the Almoravid period.[8]) During this period, Meknes was frequently the residence of Marinid princes (appointed there as governors) and especially of viziers.[8][9]:55 The Mosque of the Kasbah (the later Mosque of Lalla Aouda) was also founded and first built in 1276.[6][10] After the end of the Marinid period, however, Meknes suffered from neglect as the new Saadian dynasty (16th and early 17th century) focused their attention on their capital at Marrakesh.[9]