The County of Roussillon (, , ) was one of the Catalan counties in the Marca Hispanica during the Middle Ages. The rulers of the county were the counts of Roussillon, whose interests lay both north and south of the Pyrenees. Roussillon, historical and cultural region encompassing the southern French département of Pyrénées-Orientales and coextensive with the former province of Roussillon. Its chief city has always been Perpignan.

Visigothic county

There was a Visigothic county around the city of Ruscino in the 6th and 7th centuries with a jurisdiction corresponding to the Diocese of Elna. This early county comprising the historic comarques of Plana del Roselló, Conflent, and Vallespir was created by Visigothic king Liuva I in 571. The Visigothic legacy in Roussillon survived in its courts, where Visigothic law was applied exclusively as late as the 11th century.

County of Roussillon

Roussillon was occupied by the Moors in 721. It was probably conquered for the Frankish Empire by Pepin the Short and his Visigothic allies in 760, immediately following his conquest of Narbonne, though all that is certain is that it was in Frankish hands during the reign of Charlemagne. By that point, Roussillon had been nearly completely depopulated, was not widely cultivated, and land use was very inefficient, which has often been explained by Moorish razzias and Frankish reprisals over a span of forty years.

County of Roussillon

Pepin reestablished the old Gothic county with its seat at Ruscino. The new count—a Goth—built a castle at their capital: the castrum or castellum Rossilio, by which Ruscino came to be known as Castell-Rosselló. Beginning in 780, Charlemagne started granting aprisiones of unpopulated land in Roussillon and around Narbonne to incoming spani (or hispani, that is, Christian Spaniards of Gothic, Roman, and Basque origin). These spani migrants, along with the native Gothic aristocracy, took part in the reconquest of the southern slopes of the Pyrenees and the Tarraconensian littoral which formed the new Marca Hispanica.

County of Roussillon

Union with Empúries

The history of the Frankish county in the 8th and 9th centuries is not well known. In the Carolingian age, it may have formed the westernmost extent of non-Basque settlement in the Pyrenees. It was affected by the second wave of monasticism which swept Catalonia in the first half of the 9th century and saw the foundation and imperial recognition of new monasteries, as at Saint-Genesius des Fonts, Saint-Clement de Regulla, and Saint-André de Sureda in 819 and 823 respectively. In 859–860, a fleet of Vikings under Hasting and Bjorn plundered the abbeys of Roussillon before wintering in the Camargue.

The first count known by name, Gaucelm, received the County of Empúries in 817. The counties of Roussillon and Empúries remained united until 989. However, they probably had separate viscounts. The office of viscount appeared in Roussillon early when a Richelm is mentioned as filling it in 859. The original viscounts acted as missi dominici of the margraves of Septimania. Throughout this period, Roussillon gradually gained de facto independence from its nominal suzerain, the king of France. As late as 878, Louis the Stammerer could enforce his will in the selection of Roussillon's count, but by the end of the 9th century the royal writ rarely ran as far south as the Pyrenees. The counties of Roussillon and Empúries became relatively stable, hereditary possessions of the Bellonid family; Gausfred I even took the title dux (duke) in 975.

Late in the 10th century, Alt Rosselló, Conflent, and inland Vallespir passed to the counts of Cerdanya and Roussillon was reduced to the coastal regions of Roussillon and Vallespir. Throughout the century, Empúries was the centre of comital power and the counts had their seat there. It was only when Viking and Moorish pirates forced him to move from the coast to the more easily defensible inland that Gausfred I made his capital at Castelló d'Empúries. After his death, the counties were separated, with Roussillon going to his younger son, Giselbert I.

The division, however, was made under certain stipulations of the deceased count. First, both counts had a right to attend the synods and tribunals held in either county. Second, rights of justice were shared between the two counts. Third, the count of Roussillon had the right to make his residence in Empúries, the ancient capital. And finally, that either count could possess lands in either county. In 1014, Hugh I of Empúries invaded Roussillon, but in 1019 a pact was signed making the two counties permanently separate entities.