Two crowns
Ferdinand was the son of Alfonso IX of León and Berenguela, eldest daughter of Alfonso VIII of Castile. The pope annulled their marriage in 1204 because the couple were close kin, and Berenguela went home to Castile. When her young brother Henry I was killed in 1217, the Castilian crown passed to her, and within weeks she gave it to Ferdinand, then about sixteen. His own father invaded Castile to claim it, and the Lara family rebelled, but both were beaten off.
Alfonso IX died in September 1230 and left León not to Ferdinand but to Sancha and Dulce, his daughters by an earlier marriage. Berenguela and the girls' mother, Teresa of Portugal, met at Benavente in December and settled it: the daughters gave up the throne in return for a yearly pension. Castile and León, separate since 1157, were joined for good. The union gave Ferdinand more men and money than any Christian king of the peninsula before him.
Allies across the frontier
After Las Navas de Tolosa in 1212 the Almohad state fell into civil war, and in al-Andalus local rulers rose against it. Ferdinand began campaigning in 1224 and at first worked through them. Abd Allah al-Bayyasi, lord of Baeza, became his vassal and handed him castles in 1225. In Murcia, Ibn Hud rose against the Almohads in 1228 and won most of al-Andalus; Ferdinand fought him, made truces with him and took tribute from him in turn.
In January 1236 a band of Castilian frontier fighters climbed into the eastern suburb of Córdoba by night. Ferdinand rode south in the depth of winter to support them. Ibn Hud did not come to the city's aid, and on 29 June 1236 it surrendered; its people were allowed to leave. The great mosque was consecrated as a cathedral. The bells that Almanzor had carried off from Santiago de Compostela in 997 were, the Christian chroniclers say, carried back on the shoulders of Muslim captives.
Jaén, Granada and Seville
Ibn Hud was murdered in 1238, and his realm broke up. In the south a new ruler, Muhammad I, had made Granada his capital. In 1246, after Ferdinand besieged Jaén for months, Muhammad gave the city up, became Ferdinand's vassal and agreed to pay a yearly tribute. In the east, Murcia had already accepted Castilian protection in 1243 through Ferdinand's son, the future Alfonso X. The Nasrid emirate of Granada had bought itself time.
Then Ferdinand turned to Seville, the largest city of al-Andalus. The siege began in the summer of 1247, and Granadan troops served in the Castilian camp. On 3 May 1248 a Castilian fleet under Ramón Bonifaz broke the bridge of boats that joined the city to Triana across the Guadalquivir, cutting off supplies. Seville surrendered on 23 November 1248, and Ferdinand entered it on 22 December. Its Muslim people were given a month to leave, and most went to Granada or North Africa.
Settling the conquests
Taking the cities was only half the work. The valley of the Guadalquivir had to be filled with new people, and Ferdinand's officials divided houses and land among nobles, the military orders, churches and settlers from the north in great registers called repartimientos. This repopulation was slow and uneven. Muslims stayed on in many villages for a time as Mudejars, subjects of the Christian king, until a great revolt in 1264 under his son led to their expulsion from much of the region.
Ferdinand was planning a campaign across the strait into Africa when he died in Seville on 30 May 1252. He was buried in the former great mosque, now the cathedral. His son Alfonso X had the tomb inscribed in Latin, Castilian, Arabic and Hebrew. Later Castilian tradition made him a model of the crusading king, and he was canonised in 1671. In his own lifetime he was also the lord of Muslim vassals and the ally of Muslim princes, as the kings before him had been.