Marrakesh is the most important city out of all of Morocco's cities that used to be imperial cities. Berber farmers lived in Marrakesh during Neolithic times. Abu Bakr ibn Umar, the chieftain and cousin of the king of the Almoravids Yusuf ibn Tashfin, founded Marrakesh in the year 1062. The Almoravids built many schools and mosques in Marrakesh. Marrakesh has the name "Red City" because a lot of it is made out of red sandstone.