Meknes (Arabic: مكناس, romanized: maknās, .mw-parser-output .IPA-label-small{font-size:85%}.mw-parser-output .references .IPA-label-small,.mw-parser-output .infobox .IPA-label-small,.mw-parser-output .navbox .IPA-label-small{font-size:100%}pronounced [maknaːs]) is one of the four Imperial cities of Morocco, located in northern central Morocco and the sixth largest city by population in the kingdom. Founded in the 11th century by the Almoravids as a military settlement, Meknes became the capital of Morocco during the reign of Sultan Ismail Ibn Sharif (1672–1727), son of the founder of the Alaouite dynasty. Sultan Ismail created a massive imperial palace complex and endowed the city with extensive fortifications and monumental gates.[7] The city recorded a population of 632,079 in the 2014 Moroccan census.[6] It is the seat of Meknès Prefecture and an important economic hub in the region of Fès-Meknès. Meknes is named after an Amazigh (Berber) tribe historically known as the Miknasa (Imeknasen in Amazigh languages).[7] Volubilis, a major Roman-era settlement in Morocco and one of its early urban centres, is located near the site of the current city of Meknes. The current city and its name, however, originate with a Berber tribe called the Miknasa who settled this region around the 10th century.[8] A group of small unfortified Miknasa villages known as miknāsat al-zaytūn were established here in the 10th century.[9] The Almoravids founded a fortress or fortified settlement just south of these villages after conquering the area in the 11th century.[9] Originally called Tagrart or Taqrart, this Almoravid settlement formed the beginnings of what is now the old medina of Meknes.[10]: 176 The Nejjarine Mosque, often reputed to be the oldest mosque in the city, dates back to the Almoravid period and may have served as the central mosque of the Almoravid settlement.[10]: 177, 212–213 The mosque that became the present-day Grand Mosque of Meknes is believed to have been first built by the Almoravids in the 12th century.[11][12]