County of Barcelona
The County of Barcelona was created by Charlemagne after he had conquered lands north of the river Ebro and Barcelona, after a siege in 801. These lands, called the "Marca Hispanica", were partitioned into various counties, of which the count of Barcelona, usually holding other counties simultaneously, eventually obtained the primacy over the region. As the county became hereditary in one family, the bond of the counts to their Frankish overlords loosened, especially after the Capetian dynasty supplanted the Carolingians.