In 897, Wilfred the Hairy died having divided his vast Catalan patrimony (technically just a plurality of public offices) between his four sons. Cerdanya, Conflent, and Berga went to Miro. The Fenouillèdes and Capcir were also annexed to Cerdanya at this time. From 913 to 920, Miro also held Besalú, but on his death in 927, his territories were divided between his four sons. The eldest, Sunifred, received Cerdanya and a certain primacy over his brothers. In the last half of the 10th century, the counties of Miro were reunited (984) under one ruler: Oliba Cabreta.