The rebellion was in response to Castile's policy of relocating Muslim populations from these regions and was partially instigated by Muhammad I of Granada.
Early in the uprising, the rebels managed to capture Murcia and Jerez, as well as several smaller towns, but were eventually defeated by the royal forces.
Subsequently, Castile expelled the Muslim populations of the reconquered territories and encouraged Christians from elsewhere to settle their lands.
At the beginning of the twelfth century, the Muslim population in the peninsula was estimated to number up to 5.6 million, among whom were Arabs, Berbers and indigenous converts.
[4] The Almohad Caliphate, which had dominated Muslim Iberia, fell into dynastic struggles after Yusuf II died in 1224 without heir.
[5] Meanwhile, Ferdinand III united the Christian kingdoms of Castile and León in 1231, and taking advantage of the Muslims' disunity, conquered various territories in the south.
[7] Alfonso X had ascended to the throne in 1252 by which time, according to historian L. P. Harvey, Muslim subjects could be broadly classified into two groups: those from Old and New Castile, who had lived for several centuries under stable Castilian rule, in well-established communities, and had rights that were enshrined in the charters of their home towns or cities,[7] and those from areas conquered in the thirteenth century, who suffered from political instability.
In 1246, he agreed to pay tribute and swear fealty to Castile (then under Alfonso's father Ferdinand III) in exchange for peace.
[1] In August 1264, the Muslim inhabitants of Jerez, aided by allies from Algeciras and Tarifa,[18] attacked the outnumbered royal garrison led by Nuño González de Lara.
[23] Muslims from Old and New Castile, such as those from Ávila, Burgos, Arévalo and Madrid, which had been under Castilian rule for generations and did not suffer from Alfonso's relocation policy, largely did not join the rebellion.
[21] Castilian forces counter-attacked by marching on Jerez, a key garrison town, recapturing it in late 1264 (possibly on 9 October), after a siege.
[8] Meanwhile, Queen Violant requested help from her father, King James I of Aragon, who was initially reluctant to provide support but eventually agreed.
[26] In response to the Granadan threat, towns in Upper Andalusia established a brotherhood pact at Andújar on 26 April 1265, swearing cooperation and a common defense.
[24] His forces raided Granada's territory, including Alcalá de Benzaide, forty miles (64 km) from the emirate's capital.
[22] They offered alliance to Alfonso X, who responded by promising to personally protect them and sent a force of 1,000 men under the command of Nuño González de Lara to defend Málaga.
[31] There is a lack of record about battles or military operations from this point onward, but it seemed that the Castile-Banu Ashqilula alliance was gaining advantage.
[34] Moroccan historian Ibn Idhari's Al-Bayan al-Mughrib (written 1312) dated the treaty at 665 AH, which corresponds to a range between October 1266 and September 1267.
[8][22] In Murcia, the large Muslim population remained with their religious rights guaranteed, but they were forced to move to the suburb of Arrixaca, and their houses and lands in the city were divided among Christian settlers.
Granada had suffered a heavy defeat and had to pay an enormous tribute to Castile, significantly greater than what it paid before the rebellion.