 Also in 820, Bera went into political disfavour and lost the countships of Barcelona and Girona, which also went to Rampon.Around 813, Empúries became a separate county under Ermenguer, and in 817, it was united to the County of Roussillon.From 835 to 844, Sunyer I was count of Empúries and Peralada while Alaric I was count of Roussillon and Vallespir.