The taking of Jaén was perceived as being fundamental to let Kingdom of Castile expand into the Baetic Depression. The difficulty in this conquest were the notable :es:Murallas de Jaén|Walls of Jaén which had been built by the Almohad Caliphate. They had been instrumental in repulsing an attack on the city by Alfonso VII of León and Castile from 1151 to 1152, and another attack by the Almohads in 1162. 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. This first campaign was essentially a probe to test the defenses of Jaén.
The Siege
The strong Castilian army accompanied King Ferdinand III of Castile from Toledo. On its march to Jaén, it was joined by Ferdinand III's vassal, the King of the Taifa of Baeza, Abd Allah Ibn Muhammad Al-Bayyasi and his forces. Ferdinand III's army approached the city with the intention of probing its defenses to find if it could be captured. During the siege, besieging Castilian camps were established in all the areas around Jaén, encircling the city completely. The soldiers in these camps were instructed to carry out a campaign of attrition on the surrounding countryside which they effectively plundered of all its resources, destroying any buildings. The major action of this siege occurred during one instance of such raids, which provoked defending troops of Jaén to raid the camps. The Castilians responded by assaulting the city walls in a failed attack. The siege was lifted shortly after this was realized, and the Castilian army moved instead on Andújar which they captured later in the same year, 1225.
Consequences
The siege by Castilian forces failed to take over the city, as the Castilian army did not have the siege equipment necessary to mount a prolonged siege. The Crónica de Ávila, a contemporary source, does however recount the use of trebuchets at the battle. The defense of Jaén was led by 160 Christian knights who supported the Muslim defenders under the command of the Castilian magnate, Álvaro Pérez de Castro el Castellano, head of the House of Castro and grandson of Alfonso VII of León and Castile, the king of Castile and León. According to the Christian chronicles, 3,000 knights and 50,000 foot soldiers defended the city in addition to the 160 Christian knights under Castro.