Meknes was the capital of Morocco under the reign of Moulay Ismail (1672–1727), before it was relocated to Marrakesh. Meknes is named after a Berber tribe which, was known as Miknasa (native Berber name: Imeknasen) in the medieval North African documents. Meknes has a Mediterranean climate with continental influences. Meknes saw its golden age as the imperial capital of Moulay Ismail following his accession to the Sultanate of Morocco (1672–1727). He installed under the old city a large prison to house Christian sailors captured on the sea, and also constructed numerous edifices, gardens, monumental gates, mosques (whence the city’s nickname of « City of a Hundred Minarets ») and the large line of wall, having a length of 40 kilometres (25 miles).