Giselbert moved the capital of Roussillon from Castellrosellón to a village named Perpignan, which was destined to be the first city of Roussillon, in preference to the episcopal seat of Elna. Giselbert II made a pact with Empúries concerning military and ecclesiastical possessions. During this period, Roussillon fell more under the influence of the count of Toulouse to its north than the count of Barcelona to its south, contrary to the path of most of the Catalan counties. It also suffered under a series of coastal raids by the navy of the "taifa" kingdom of Denia.