The town was founded in 1322 by Dona MaríaDíaz de Haro. The foundation charter was lost years later, and subsequently ratified in 1432 by means of a confirmation of the privilege granted by John II of Castile.