more deliberate campaign of conquest. Between 1244 and 1248 the Marinids were able to take Taza, Rabat, Salé, Meknes and Fez from the weakened Almohads. Meknes was captured in 1244 or 1245, Fez was captured in 1248, and Sijilmassa in 1255. The Almohad caliph, Sa'id, managed to reassert his authority briefly in 1248 by coming north with an army to confront them, at which point Abu Yahya formally submitted to him and retreated to a fortress in the Rif. However, in June of the same year the caliph was ambushed and killed by the Zayyanids in a battle to the south of Oujda. The Marinids intercepted the defeated Almohad army on its return, and the Christian mercenaries serving under the Almohads entered the service of the Marinids instead. Abu Yahya quickly reoccupied his previously conquered cities the same year, and established his capital in Fes. His successor, Abu Yusuf Yaqub (1259–1286) captured Marrakech in 1269, effectively ending Almohad rule. Apogee After the Nasrids of Granada ceded the town of 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 Iberian Christians were first able to take the fighting across the Strait of Gibraltar to what is today Morocco: in 1260 and 1267 they attempted an invasion, but both attempts were defeated. After gaining a foothold in the city of Algeciras in the southern tip of the Iberian Peninsula, 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 conquered several nearby Iberian towns: by the year 1294 they had occupied Rota, Tarifa and Gibraltar. In 1276 they founded the north African city of 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 madrasas in the city