The town was noted, from XIII century, as a border territory of the Nazari kingdom of Granada, with the Crown of Castile.
Se configuró desde el s. XIII, como territorio fronterizo del reino Nazarí de Granada, con la Corona de Castilla.