By 1240 the taifa was increasingly atomised, with several cities split from the nominal authority of the emir in the city of Murcia, who still claimed authority over the full jurisdiction. Before the triple military threat posed by Castile, Aragon and Granada, the Murcian Emir Muhammad al-Dawla opted to negotiate a treaty with the Castilian King Ferdinand III. After the 1243 was reached, the city and the rest of the taifa became a vassal state of the Crown of Castile. As a progressive breach of the conditions abided in the treaty of Alcaraz ensued, discontent increased among the Muslim population, leading to a full-blown insurrection, with the rebels in Murcia joining the 1264 Múdejar revolt. After the intervention of Aragon in 1265, the rebels surrendered the city to forces commanded by Jaime I of Aragon on 2 February 1266; the city was returned to his son-in-law Alfonso X of Castile by the middle of that year. Following the quelling of the rebellion, Alfonso X granted Murcia a charter and privileges similar to those of Seville in 1266.