After the Christian victory and the expulsion of the Muslim population the city was divided between those who had participated in the conquest, according to the testimony in the Llibre del Repartiment (Book of Distribution).