 Between the 8th and 10th centuries a great process of repopulation took place, which indicates that these lands were almost uninhabited.King Alfonso I of Asturias (739-757), Duke of Cantabria, ordered the resettlement of what now is known as the "comarca" of Trasmiera, where there was little presence of human settlements.The repopulation was done following the habits of the time, with the help of small monasteries, around which immediately appeared family settlements which would reach village status, marking the origin for future small towns or villas.