Since its creation in 858 Idriss, a descendant of the prophet Mohammed who fled Bagdad. This city has attracted a wide array of populations, Berbers, Arabs, Jews from Spain, French under the protectorate, Moroccan rural migrants, tourists and African students. Fez reached its height in the 13th–14th centuries under the Marinids, when it replaced Marrakesh as the capital of the kingdom. Medina has its’ hidden secrets containing madrasas, fondouks, palaces, residences, mosques and fountains.