King Alfonso VIII of Castile and King Alfonso IX of León in the city of Toledo. After the failed meeting between the two sovereigns, Fernandez de Castro stayed in León fighting against the kingdom of Castile while his cousin, the king of León, once again named him his mayordomo mayor. During the war between Castile and León, and in order to help Castile, Pope Celestine III excommunicated King Alfonso IX, Pedro Fernández de Castro and the other nobles who had helped the Saracens in their fight against Castile. The Pope also released the Leonese King's vassals from their pledge of loyalty to their king. Nevertheless, the hostilities between both kingdoms ceased in 1197 after the marriage of Alfonso IX of León and Berengaria of Castile since Berengaria's dowry included several castles that her husband had claimed from Castile. Marriage and descent He married Jimena Gómez de Manzanedo, daughter of Count Gómez González de Manzanedo and Milia Pérez de Lara, with whom he appears in several charters. They were the parents of: Álvaro Pérez de Castro "the Castilian" (died 1240). Elo Pérez de Castro (died after 1243). Her first husband, whom she divorced, was Martim Sanches, an illegitimate son of King Sancho I of Portugal and Maria Aires de Fornelos. Divorced from her first husband, in 1205 she married Guerau IV de Cabrera Viscount of Àger, son of Ponce de Cabrera and Marquesa (Miracle) de Urgel. Elo and her husband were the parents of, among others, Ponce I of Urgell. She was buried in the Monastery of Santa María de Valbuena. Stephanie Perez de Castro to whom her sister, countess Elo, in 1221 assigned 5,000 maravedíes of income in the Kingdom of Aragón. Final years In 1204, Fernandez de Castro again served as Alfonso IX of León's mayordomo mayor and, in the same year, with his wife Jimena and their children Álvaro and Elo and became a familiares of the Order of Calatrava. A year later, he donated to the Order of Salvatierra and its master, Martín Martínez, the hospital of Santa Olalla, the villa of Ranconada, half of the vineyards that he owned in Aldovea, Cortes, Santa Olaya and the surrounding areas to the south under the condition that the income from these properties were for supporting the hospital in Santa Olalla. In 1204 his cousin Alfonso VIII of Castile restored all the properties that had been previously confiscated by