Wilfred the Hairy
The earliest historical mention of the castle is in the year 982, according to some sources or in 885; in either case it appears already cited in 875 in the donation of the dowry of Emma, daughter of Wilfred the Hairy, count of Barcelona, as a gift when she entered the monastery in Sant Joan de les Abadesses.