There is even an instance of a crusade being declared against another Christian king in Hispania. Although Christian rulers Fernán González of Castile and Ramiro II of León had cooperated to defeat the Muslims at the Battle of Simancas (939), Fernán attacked Ramiro soon after and the Leonese–Castilian war that followed lasted until Ramiro's victory in 944. Ramiro II's death caused the war of the Leonese succession (951–956) between his sons, and the winner Ordoño III of León concluded peace with caliph Abd al-Rahman III of Córdoba. After the defeat of Alfonso VIII, King of Castile, at Alarcos, Kings Alfonso IX of Leon and Sancho VII of Navarre entered an alliance with the Almohads and invaded Castile in 1196. By the end of the year Sancho VII had dropped out of the war under Papal pressure. Early in 1197, at the request of Sancho I, King of Portugal, Pope Celestine III declared a crusade against Alfonso IX and released his subjects from their responsibilities to the king, declaring that "the men of his realm shall be absolved from their fidelity and his dominion by authority of the apostolic see." Together the Kings of Portugal, Castile, and Aragon invaded Leon. In the face of this onslaught combined with pressure from the Pope, Alfonso IX was finally forced to sue for peace in October 1197. In the late years of Al-Andalus, Castile had the might to conquer the remnants of the kingdom of Granada, but the kings preferred to wait and claim the tribute of the Muslim parias. The trade of Granadan goods and the parias were a major means by which African gold entered medieval Europe. Muslim infighting Similarly, there was frequent Muslim infighting throughout the existence of al-Andalus. The Abbasid Revolution (747–750) divided Muslim rulers in Iberia into the pro-Abbasid Caliphate faction (based in Baghdad) and the pro-Umayyad faction (reconstituted as the Emirate of Córdoba). Charlemagne's failed 778 campaign into Iberia was prompted by the invitation of the pro-Abbasid governor of Barcelona, Sulayman al-Arabi, which led to a brief Abbasid-Carolingian Alliance against the Umayyads. During the Fitna of al-Andalus (1009–1031), the Umayyad-run Caliphate of Córdoba fell apart into rival taifas headed by Islamic emirs warring each other. After the Christian king of Castile and León conquered Toledo in 1085, the emirs requested Yusuf ibn Tashfin, leader of the strict Islamic Almoravid sect, to come to their defence, which he did