The area was dominated by the Franks after the conquest of Girona (785) and especially when, in 801, the city of Barcelona was conquered by King Louis the Pious of Aquitaine, and was incorporated into the Frankish kingdom. The county of Barcelona was established there, reporting to the Frankish king. The first count of Barcelona was Bera (801–820).