The Marinids were the Berber dynasty that ruled Morocco from the thirteenth to the fifteenth century (1244–1465). From their capital at Fez, the Zenata sultans reunified the country after the Almohads and gave Morocco its golden age of architecture and learning — the madrasas they raised, above all the Bou Inania, still define Moroccan art.
The Banu Marin were Zenata Berbers from the highlands between Taza and Algeria, first hired as mercenaries by the crumbling Almohads, then their supplanters. In 1269 they took Marrakech and made Fez their capital. Under Abu Yusuf Yaqub (1259–1286) and above all Abu al-Hasan (1331–1348), who briefly held Tlemcen and Tunis, the Marinid sultanate was the greatest power of the western Mediterranean — until the defeat at Río Salado in 1340 closed the door to Iberia.