The County of Pallars or Pallás (Catalan: Comtat de Pallars, IPA: [kum'tad d? p?'?as]; Latin: Comitatus Pallariensis) was a de facto independent petty state, nominally within the Carolingian Empire and then West Francia during the ninth and tenth centuries, perhaps one of the Catalan counties, originally part of the Marca Hispanica in the ninth century. It was coterminous with the upper Noguera Pallaresa valley from the crest of the Pyrenees to the village of Tremp, comprising the Vall d'Àneu, Vall de Cardós, Vall Ferrera, the right bank of the Noguera Ribagorçana, and the valley of the Flamicell. It roughly corresponded with the historic region of Catalonia called Pallars. Its chief city was Sort.
The early history of Pallars, which was the easternmost extent of Basque settlement, is linked to that of its western neighbour, Ribagorza. Both territories, nominally lands of the Moors, came under the sway of the count of Toulouse perhaps as early as 781, perhaps as late as the start of the 9th century. They formed in turn a new province attached to Toulouse and therefore became Carolingian vassals.
A widely circulated monkish account of 1078 from the Abbey of Santa María de Alaón contains the earliest foundation myth of any of the counties of the Hispanic March. Written at a time when the independence of Pallars and Ribagorza was threatened by the hegemony recently created by the personal union of the Kingdom of Navarre and Kingdom of Aragon (1076). It records that Count Bernard and Bishop Ato, both of Ribagorza and descended by tradition from Charlemagne, spearheaded the conquest and repopulation of Sobrarbe and Pallars respectively and that the bishop held ecclesiastical rule over all three counties.
In reality, being so far from the centres of Carolingian power, it was easy for the rulers of Toulouse to act as sovereigns in Pallars and Ribagorza, granting privileges to monasteries in a style very similar to that of their own Frankish lords. Two monasteries were founded in the valleys of the two principal rivers of Pallars: Gerri by the Noguera Pallaresa and Senterada by the Flamicell on land granted by the emperor Louis the Pious himself. The revival of monasticism was largely associated with non-Frankish and especially Visigothic clergymen.Charlemagne himself, however, attached Pallars and Ribagorza ecclesiastically to the diocese of Urgell. In 817, Pallars and Ribagorza were made a part of the Kingdom of Aquitaine bestowed on the young Pepin, second son of the emperor Louis the Pious. Throughout the ninth century, the aprisio had increasingly become a principal form of land division and ownership in Pallars, which was not yet feudalised. Louis the Pious forbade the holding in beneficium of church property and by the end of the ninth century, most aprisiones in Pallars had been converted into allods: feudalism was never to take hold.
The local population — Basque, Visigothic, and Hispano-Roman — rejected the rule of the house of Toulouse. In 833, one Aznar Galíndez, already Count of Urgell and Cerdagne, usurped the pagi (countries) of Pallars and Ribagorza. He was immediately dispossessed of Urgell and Cerdagne by Louis the Pious (in 834), but managed to hold out in mountainous Pallars and Ribagorza for several more years--until he was expelled, either in 838 by Sunifred I, Count of Barcelona, and partisans of Bernard of Septimania, or in 844 by the Count of Toulouse, Fredelon.
Opposition to Toulousain suzerainty remained, however, while the Toulousain counts governed Pallars through viscounts. In Pallars, vicars were not employed, rather a minor official beneath the viscount called the centenarius was used. In 872, a crisis enveloped Toulouse when the incumbent count, Bernard II, was assassinated by the fideles (faithful men) of Bernard Plantapilosa, who was recognised as the late count's successor by the king, Charles the Bald. The men of Pallars and Ribagorza took the opportunity to regain their independence from Toulouse. One of them, a local cacique named Raymond, who had probably originally held them as a subject of Toulouse, found himself count of the territories formerly of Toulouse south of the Pyrenees: the first Count of Pallars and Ribagorza. The loss of Pallars and Ribagorza to Frankish suzerainty was the first step in the gradual weakening of the ties between Catalonia and the Francia.
The reign of Raymond I began with overtures of peace and alliance with the Muslim governors of nearby Huesca and Zaragoza (then under the Banu Qasi), but to no avail; by the end, a policy of Reconquista had been adopted. The reign also saw a proliferation (encastellation) of turres (defensive towers) in Pallars and Ribagorza; castles such as Leovalles, Castellous, and Lemignano also multiplied. Raymond also consolidated his de facto independence from any superior authority by creating a new diocese of Pallars, enabling himself to control the local church. Raymond, a Basque himself, established an alliance with the Jiménez dynasty in Navarre, helping them to take the throne. He lost much of Ribagorza to Huesca in 907 and thereafter ruled mainly just Pallars, which had always been his political base. He died in 920. Pallars was inherited by his two youngest (of four) sons, Isarn and Lope I of Pallars.
The history of Pallars in the tenth century is obscure. It was ruled by brothers of the native dynasty, which had married into the Bellonid dynasty ruling in Barcelona. Pallars and Ribagorza had experienced a constant decline as brother and cousins divided it up, and the phrase in rem valentem appearing in charters indicates a transition from a money to a barter economy. By late in the tenth century, the counts of Pallars, still refusing to recognise any authority higher than themselves, began using the title marchio in documents. By 975, their underlings, the milites (knights) who governed the countryside from the castles, levied dues, formerly Carolingian royal dues, on the inhabitants for the upkeep of defence, and to line their personal coffers. At the same time, a steady advance was made in the borderlands; many charters make reference to land acquired de ruptura along in line settlement along the frontier.
When Sunyer I, who had outlived his brothers and nephews, and died in 1011, the once independent Pallars, through subdivision of authority, had become subject to influences from Urgell, Barcelona, and Aragon. Sunyer's two sons divided their inheritance, with Raymond III ruling in Pallars Jussà and William II in Pallars Sobirà.