 However, the territory was Muslim until a Mudejar revolt in 1264-1266.The king James I of Aragon defeated the revolt.The former Taifa of Murcia was quite empty and the Castilian king decided to repopulate it.