city of León. Between the years 1185 and 1188, Fernandez de Castro remained a loyal vassal to his cousin Alfonso VIII, but in 1189, he had a falling out with the king and left the kingdom of Castile. He went to serve his cousin Alfonso IX of León, father of Ferdinand III of Castile. Following in the footsteps of his father, he began to ally with the Almohads at different times in detriment of the interests of his cousin, the king of Castile. His attitude in the remaining years of the twelfth century depended on the evolution of relations between the kingdoms of Castile and León that were under the progressive influence of the papacy and military orders. When King Alfonso IX of León married Teresa of Portugal, daughter of King Sancho I, with the ostensible purpose of an alliance against Castile, several fortresses controlled by Pedro Fernández de Castro were assigned to the Portuguese since he was known to be an enemy of his cousin Alfonso VIII. In 1191, the kingdoms of Navarre, Portugal, León and Aragon, formed the so-called League of Huesca, whose purpose was to combat the Kingdom of Castile. Meanwhile, Pope Celestine III threatened Alfonso IX of León with excommunication, after marrying his second cousin Berenguela of Castile. Between 1192 and 1193, Fernández de Castro was often in Castile. When he was near Seville, he suffered from a serious illness that doctors could not remedy and he asked to be taken to the Church of San Isidoro en Seville where the Christians of Seville would go often since the remains of Isidore had been buried there before being transferred to the Basilica of Saint Isidore in León. After fulfilling a promise he had made to the saint, he regained his health. Although the year that this took place is not known, it must have been around 1193, before the Battle of Alarcos. In 1194, Fernandez de Castro tried to sabotage the signing of the Treaty of Tordehumos that was to put an end to the conflict between Alfonso IX of León and Alfonso VIII of Castile. He decided to leave the peninsular Christian kingdoms for Al-Andalus. He entered into an agreement with the Almohads and fought on their side at the Battle of Alarcos, in which Alfonso VIII's troops were defeated by the Muslims. After the battle, he acted as the mediator in the negotiations between