In 1244, the Marinid rulers overthrew the Almohad Caliphate, which controlled Morocco. The Marinid dynasty briefly held sway over all the Maghrebin the mid-14th century. It supported the Kingdom of Granada in Al-Andalus in the 13th and 14th centuries; an attempt to gain a direct foothold on the European side of the Strait of Gibraltar was however defeated at the Battle of Río Salado in 1340 and finished after the Castilian conquest of Algeciras from the Marinids in 1344.
The tribe had first frequented the area between Sijilmasa and Figuig, Morocco. Following the arrival of Arab tribes in the area in the 11th-12th centuries, Marinids moved to the north-west of present-day Algeria, before settling into northern Morocco by the beginning of the 13th century.
The Marinids took their name from their ancestor, Marin ibn Wartajan al-Zenati.
After arriving in Morocco, they initially submitted to the Almohad dynasty, which was at the time the ruling house. After successfully contributing to the Battle of Alarcos, in central Spain, the tribe started to assert itself as a political power. Starting in 1213, they began to tax farming communities of north-eastern Morocco (the area between Nador and Berkane). The relationship between them and the Almohads became strained and starting in 1215, there were regular outbreaks of fighting between the two parties. In 1217 they tried to occupy eastern Morocco, but they were expelled, pulling back and settling in the eastern Rif mountains. Here they remained for nearly 30 years. During their stay in the Rif, the Almohad state suffered huge blows, losing large territories to the Christians in Spain, while the Hafsids of Ifriqia broke away in 1229, followed by the Zayyanid dynasty of Tlemcen in 1235.
Between 1244 and 1248 the Marinids were able to take Taza, Rabat, Salé, Meknes and Fes from the weakened Almohads. The Marinid leadership installed in Fes declared war on the Almohads, fighting with the aid of Christian mercenaries. Abu Yusuf Yaqub (1259–1286) captured Marrakech in 1269.
After the Nasrids ceded Algeciras to the Marinids, Abu Yusuf went to Al-Andalus to support the ongoing struggle against the Kingdom of Castile. The Marinid dynasty then tried to extend its control to include the commercial traffic of the Strait of Gibraltar.
It was in this period that the Spanish Christians were first able to take the fighting to Morocco: in 1260 and 1267 they attempted an invasion of Morocco, but both attempts were defeated. After gaining a foothold in Spain, the Marinids became active in the conflict between Muslims and Christians in Iberia. To gain absolute control of the trade in the Strait of Gibraltar, from their base at Algeciras they started the conquest of several Spanish towns: by the year 1294, they had occupied Rota, Tarifa and Gibraltar.
In 1276 they founded Fes Jdid, which they made their administrative and military centre. While Fes had been a prosperous city throughout the Almohad period, even becoming the largest city in the world during that time, it was in the Marinid period that Fes reached its golden age, a period which marked the beginning of an official, historical narrative for the city. It is from the Marinid period that Fes’ reputation as an important intellectual centre largely dates, they established the first madrassas in the city and country. The principal monuments in the medina, the residences and public buildings, date from the Marinid period.
Despite internal infighting, Abu Said Uthman II (1310–1331) initiated huge construction projects across the land. Several madrassas were built, the Al-Attarine Madrasa being the most famous. The building of these madrassas was necessary to create a dependent bureaucratic class, in order to undermine the marabouts and Sharifian elements.
The Marinids also strongly influenced the policy of the Emirate of Granada, from which they enlarged their army in 1275. In the 13th century, the Kingdom of Castile made several incursions into their territory. In 1260, Castilian forces raided Salé and, in 1267, initiated a full-scale invasion, but the Marinids repelled them.
At the height of their power, during the rule of Abu al-Hasan ‘Ali (1331–1348), the Marinid army was large and disciplined. It consisted of 40,000 Zenata cavalry, while Arab nomads contributed to the cavalry and Andalusians were included as archers. The personal bodyguard of the sultan consisted of 7,000 men and included Christian, Kurdish and Black African elements. Under Abu al-Hasan another attempt was made to reunite the Maghreb. In 1337 the Abdalwadid kingdom of Tlemcen was conquered, followed in 1347 by the defeat of the Hafsid empire in Ifriqiya, which made him master of a huge territory, which spanned from southern Morocco to Tripoli. However, within the next year, a revolt of Arab tribes in southern Tunisia made them lose their eastern territories. The Marinids had already suffered a crushing defeat at the hands of a Portuguese-Castilian coalition in the Battle of Río Salado in 1340 and finally had to withdraw from Andalusia, only holding on to Algeciras until 1344.
In 1348 Abu al-Hasan was deposed by his son Abu Inan Faris, who tried to reconquer Algeria and Tunisia. Despite several successes, he was strangled by his own vizir in 1358, after which the dynasty began to decline.
After the death of Abu Inan Faris in 1358, the real power lay with the viziers, while the Marinid sultans were paraded and forced to succeed each other in quick succession. The county was divided and political anarchy set in, with different viziers and foreign powers supporting different factions. In 1359 Hintata tribesmen from the High Atlas came down and occupied Marakesh, capital of their Almohad ancestors, which they would govern independently until 1526. To the south of Marakesh, Sufi mystics claimed autonomy, and in the 1370s Azemmour broke off under a coalition of merchants and Arab clan leaders of the Banu Sabih. To the east, the Zianid and Hafsid families reemerged and to the north, the Europeans were taking advantage of the Moroccan instability by attacking the Moroccan coast. Meanwhile, unruly wandering Arab Bedouin tribes increasingly spread anarchy in Morocco, which accelerated the decline of the empire.
In the 15th century, Morocco was hit by a financial crisis, after which the state had to stop financing the different marabouts and Sharifian families, which had previously been useful instruments in controlling the country. The political support of these marabouts and Sharifians halted, and Morocco splintered into different entities. In 1399 Tetouan was taken and its population was massacred and in 1415 the Portuguese captured Ceuta. After the sultan Abdalhaqq II (1421–1465) tried to break the power of the Wattasids, he was executed.
Marinid rulers after 1420 came under the control of the Wattasids, who exercised a regency as Abd al-Haqq II became Sultan one year after his birth. The Wattasids, however, refused to give up the Regency after Abd al-Haqq came to age.
In 1459, Abd al-Haqq II managed a massacre of the Wattasid family, breaking their power. His reign, however, brutally ended as he was murdered during the 1465 revolt. This event saw the end of the Marinid dynasty as Muhammad ibn Ali Amrani-Joutey, leader of the Sharifs, was proclaimed Sultan in Fes. He was in turn overthrown in 1471 by Abu Abd Allah al-Sheikh Muhammad ibn Yahya, one of the two the surviving Wattasids from the 1459 massacre, who instigated the Wattasid dynasty.
- 1215–1269: leaders of the Marinids, engaged in a struggle against the Almohads, based in Taza from 1216 to 1244
- Since 1244: Marinid Emirs based in Fez
- 1269–1465: Marinid Sultans of Fez and Morocco
- Abu Yusuf Yaqub (1269–1286)
- Abu Yaqub Yusuf (1286–1306)
- Abu Thabit Amir (1307–1308)
- Abu al-Rabi Sulayman (1308–1310)
- Abu Said Uthman II (1310–1331)
- Abu al-Hasan ‘Ali (1331–1348)
- Abu Inan Faris (1348–1358)
- Muhammad II as Said (1359)
- Abu Salim Ali II (1359–1361)
- Abu Umar Tashfin (1361)
- Abu Zayyan Muhammad III (1362–1366)
- Abu l-Fariz Abdul Aziz I (1366–1372)
- Muhammad as-Saîd (1372–1374)
- Abu l-Abbas Ahmad (1374–1384)
- Abu Zayyan Muhammad IV (1384–1386)
- Muhammad V (1386–1387)
- Abu l-Abbas Ahmad (1387–1393)
- Abdul Aziz II (1393–1398)
- Abdullah (1398–1399)
- Abu Said Uthman III (1399–1420)
- Abd al-Haqq II (1420–1465)