Morocco
From the 11th century onwards, a series of powerful Berber dynasties arose. Under the Almoravid dynasty  and the Almohad dynasty, Morocco dominated the Maghreb, much of present-day Spain and Portugal, and the western Mediterranean region. From the 13th century onwards the country saw a massive migration of Banu Hilal Arab tribes. In the 13th and 14th centuries the Merinids held power in Morocco and strove to replicate the successes of the Almohads by military campaigns in Algeria and Spain. They were followed by the Wattasids. In the 15th century, the Reconquista ended Muslim rule in central and southern Spain and many Muslims and Jews fled to Morocco.