In April 1231, King Ferdinand III of Castile and Leónordered an expedition by algaras. This departed from Andújar towards Córdoba, leaving a trail of destruction in its path. They raided Palma del Río, killing many inhabitants, then proceeded as far as Seville which they bypassed. The expedition proceeded towards Jerez and Vejer camping near the Guadalete River. In all likelihood this force was intended to distract Ibn Hud from the frontier, and in this it succeeded. Emir Ibn Hud pursued and caught the expedition, but in the subsequent battle his troops were routed and suffered heavy losses, allowing the Christians to depart loaded with loot. On a strategic level, the raid was also successful in that it allowed the unimpeded capture of Quesada by an army of Archbishop Rodrigo Jiménez de Rada, also ordered in April by Ferdinand.
Castilian commander
It is not clear who led the Castilian expedition. It is undisputed that Álvaro Pérez de Castro was present, and he may have been in command. A reference to infante Alfonso in the Christian chronicle has been interpreted to mean either the King's brother, Alfonso de Molina, or the King's son, the futureAlfonso X. The Primera Crónica General interpreted it as Molina, and so did historian Derek William Lomax in 1978. However, historian Gonzalo Martínez Diez concluded in 2000 that it was the king's son, because of a passage that describes the infante as being very young and under the protection of Álvaro Pérez de Castro who led the troops. Spanish historian Julio González was aware of both interpretations, but in 1946 thought it was highly improbable that Ferdinand's son was involved in a military action at such a young age. A 2003 biography of Alfonso X also places him alongside Álvaro Pérez de Castro in the raiding campaign of 1231, including the battle.
Effect
In his chronicle, Alfonso X referred to the operation as a cavalgada, a large-scale mounted raid. Alfonso X described its impact as follows: Gonzalo Martínez Diez concludes that the defeat certainly weakened Ibn Hud's power base, for in April 1232 a challenger arose in the person of Muhammad ibn Nasr, who proclaimed himself emir in Arjona, and would eventually become the first Nasrid ruler of Granada. According to Julio González, Ibn Hud was perhaps more concerned with eliminating the remnants of the Almohads, as he took Gibraltar from them in October 1231, finally driving them out of the peninsula, and later laid siege to Ceuta in 1232. Ibn Hud's reign started to fall apart only a year later, between October 1232 and October 1233, suffering both internal and external setbacks: a rebellion in Seville sought alliance with ibn Nasr, the Christians took Úbeda, and the Almohads secured Ceuta. Another measure of the unraveling of Ibn Hud's power is that a later raid against Cádiz went unopposed, and the city was ferociously sacked by Christian mercenaries in 1234–1235. The battle was later glorified in the writings of the 19th-century Spanish romantic writer Adolfo de Castro.