Although the city of Marrakesh was founded by the Almoravids in 1060, jews settled 40 km away and there is no recorded jewish presence in the city until 1232. After the Reconquista and expulsion of Jews from the Iberian Peninsula in 1492, jews started to arrive in great numbers to Morocco, settling mostly in cities and mixing with the local Jewish population. Many mellahs were created to protect the jews under their dhimmi status.