The ancient diocese of Osona was sacked by the Arabs in the mid eighth century (c. 750–755). Its reconquest by Christian powers began in 798; in that year Louis of Aquitaine ordered a GothBorrell to enter the abandoned region and repair the castles of Vic, Cardona, and Casserès.[1] Vic was in Frankish hands by 799. After the successful siege of Barcelona in 801, Borrell, already Count of Cerdanya and Urgell, received Osona as a countship from his liege lord, King Louis. On Borrell's death, Osona was granted to the FrankishCount of Barcelona, Rampon. After the rebellion of 826, during which Guillemó and Aissó succeeded in taking it with help from the Emirate of Córdoba, Osona remained depopulated and outside of Frankish control until 879.[2] It was considered to be part of the County of Barcelona throughout that period.
In 879, Wilfred the Hairy began the repopulation of the county with free minores, who cultivated the lands given them as aprisiones; they turned Osona into a central and important part of Catalonia.[3] There was a viscounty of Osona from 900.[4] The viscounts controlled the region on behalf of the counts, who were usually resident in Barcelona. The viscountship later changed its name to viscounty of Cabrera[citation needed]. Wilfred, who established the viscounty, also built new castles along the frontier of Osona, at Torelló (881), Montgrony (887), and Tarabaldi (892).[5] All these fortresses were controlled either directly by the count or by a castellan who also controlled the appendici or surrounding territory on certain specific terms.[6] The castle, in fact, and its mandamenta (commandment) were the central organising feature of Osona after its repopulation. Wilfred also reorganised the church in Osona — after the bishopric, Wilfred's foundation of the convent of Sant Joan de les Abadesses, originally under his daughter Emma, was the most important ecclesiastical institution in the county[7] — and introduced serfdom on a limited scale.
Throughout the tenth century, Osona remained tied to Barcelona, except for the brief rule of Ermengol from 939 to 943. In 990, the small pagus of Berga was detached from it and granted to Cerdanya. In 1035, Osona was detached from Barcelona for another brief period when Berenguer Ramon I left it to his widow, Guisla de Lluça, on his death. She ruled it with her son William until she remarried and he renounced it. After that, it was reattached to Barcelona, but was augmented by the addition of the County of Manresa, which was subsumed within Osona and ceased to be a distinct polity in the region.[citation needed].
Ramon Berenguer III ceded the county to his son-in-law Bernard III of Besalú, as dowry of his daughter Jimena in 1107. When both Jimena and Bernard died without heirs, Osona returned to Barcelona. This was to be the end for Osona as a nominally distinct county; the use of the terms "county" and "count" of Osona disappeared subsequently. From that point, its history was linked to the Principality of Catalonia. The title was revived for the Cabrera family in 1356 and it passed to the House of Montcada in 1574 and the Medinaceli in 1722, but none of these families ever controlled the feudal region.