 After several Berbers formed more powerful Islamic dynasties that reigned over the country.Among them were the Almoravids (1040–1147), who was the first to unite Morocco, as well as significant regions in West Africa, Spain and Algeria.The Almoravids were responsible for making the Malikii school of Islamic jurisprudence the most prominent in Morocco.