Meknes is a city in northern Morocco and the sixth largest city of the kingdom. Meknes was the capital of Morocco under the reign of Moulay Ismail (1672–1727), before it was relocated to Marrakesh. The urban population is estimated at 650,000 with the metropolitan population close to 1,000,000. It is the capital of Meknès Prefecture. Meknes is named after a Berber tribe which, was known as Miknasa (native Berber name: Imeknasen) in the medieval North African documents.