 1166 is traditionally claimed as the start year of the construction of the castle, although the inscription on the Donjon has quite deteriorated.It can, however, be read dating to 1172 or 1181.During the reign of Sancho I (1185-1211), efforts were undertaken to repopulate the village, which soon enough became the county seat.