Meknes is a city in northern Morocco, located 130 kilometres (81 mi) from the capital Rabat and 60 kilometres (37 mi) from Fes. It is served by the A2 expressway between those two cities and by the corresponding railway. Meknes was the capital of Morocco under the reign of Moulay Ismail (1672–1727), before it was relocated to Marrakech. The population is 985,000 (2010 census). It is the capital of the Meknes-Tafilalet region. Meknes is named after a Berber tribe which was known as Miknasa in the medieval North African sources.