Abu Yusuf Yaqub ibn Abd al-Haqq

At the time of Abu Yahya's death in July, 1258, the Marinids were installed in Fez and controlled eastern and northern Morocco, the Almohads reduced to the southerly districts around their capital, Marrakech.

In September, 1260, in a surprise attack, a Christian naval force from Spain, probably Castilian, landed on the Atlantic coast of Morocco and seized the city of Salé.

Instead, Abu Dabbus persuaded the Abdalwadid ruler Yaghmorassan of the Kingdom of Tlemcen to launch an incursion into Marinid land from the northeast.

Abu Yusuf broke off his campaign against the errant Almohad client to deal with the Tlemcen intervention, defeating the Abdalwadids at a battle by the Moulouya in 1268.

Like the Almoravids, the Marinids never adopted the caliphal title (amir al-mu'minin), believing it to be an impious pretension (although the contemporary Hafsid rulers of Ifriqiya would soon take it up).

Abu Yusuf erected the advanced coastal fortress of Taount to police any future Abdalwadid interventions in Marinid dominions.

Granada was then plunged in civil war, with the Nasrids fighting off a challenge from the rival Banu Ashqilula family, rulers in Málaga, Guadix and Comares.

But Alfonso X did not fulfill his side of the agreement and continued his support for the Ashqilula, so Muhammad II renewed his request to the Marinids for assistance, offering them the Iberian towns of Tarifa, Algeciras and Ronda as payment.

With Morocco now pacified and Tlemcen controlled, in April 1275, Abu Yusuf Yaqub took up the Nasrid request and crossed the straits, landing a large Moroccan army in Spain.

The arrival of the Marinids and the absence of Alfonso X (then at a meeting with the pope in France) prompted the Banu Ashqilula to quickly come terms with the Nasrids.

With that out of the way, raids were launched on Castilian lands – the Marinids ravaged Castilian-ruled Andalusia below the Guadalquivir, while Muhammad II led a Granadan army against Cordoba.

News of the Marinid landing had prompted frantic preparations by the Castilian crown prince Ferdinand de la Cerda, left regent in his father's absence, to counter it.

But no sooner had the Castilian threat receded, that Abu Yusuf and Muhammad II fell into a quarrel over whom exactly held suzerain title over Algeciras and Málaga.

For his part, Muhammad II al-Faqih of Granada turned to Peter III of Aragon and Alfonso X's estranged son, the infante Sancho.

With his back freed from the Tlemcen threat, Marinid emir Abu Yusuf decided to honor Alfonso X's choice with a new expedition to Spain to support Cerda and his confederates.

Finding a pitched battle unwise, Abu Yusuf decided to lift the siege of Jerez, withdrew his army to the safety of Algeciras, and opened negotiations with the Castilian usurper.

He put a final end to the Almohads, unified Morocco, established their new grandiose capital at Fez el-Jedid and gave the Marinids their foothold in Spain.

Abu Yusuf Yaqub may have turned the Marinids into the pre-eminent Muslim power of the region – certainly stronger than the Nasrids of Granada, the Abdalwadid of Tlemcen or the Hafsids of Ifriqiya.

But they remained, at root, a tribal dynasty, and without the kind of religious authority or prestige the Almoravids or the Almohads enjoyed, the Marinid chances of replicating their empires over the Maghreb and Spain were fatally circumscribed.