 In the High Middle Ages, its castle, the Castle of Saguardia, located in the county of Les Llosses was ruled by the Saguàrdia family, of which Ponç de la Guàrdia was a famous troubadour.An abundance of coal and iron ore, coupled with the ample water supply of the rivers Ter and Freser, encouraged a metal-working industry in the early Middle Ages.The furnaces of Ripoll were a prime source of nails for the peninsula.