 After the Reconquista, it turned into a frontier territory with the Kingdom of Granada.Alfonso X of Castile made it a sister site to the city of Lorca.His castle and step was destroyed by the dominion of Sancho Manuel, son of Juan Manuel, Prince of Villena in the 14th century, similar to the dominion of the Riquelme.