The taking of Jaén was perceived as being fundamental to let Kingdom of Castile expand into the Baetic Depression.
Taking this into account, in 1224, Ferdinand III of Castile attacked the surrounding lands in what today is the province of Jaén, establishing their base of operations at Baeza with their Muslim ally, Abd Allah Ibn Muhammad Al-Bayyasi, the king of the Taifa of Baeza.