In this period of political confusion, the viscount Bernard Sunifred rebelled. His lands were clustered in the north of Cerdanya, in the Segre valley and Conflent with their centre at Merencs. He put his lands under the nominal suzerainty of the count of Toulouse and tried to draw them away from Cerdanya. Bernard was forced to make peace with Raymond in 1047 and his allodial lands were handed over, though he was compensated with more fiefdoms from the count. Bernard rebelled a second time and was forced to make peace again in 1061. The important pass of Pimorent, which, now that Cerdanya was no longer a marcher territory, lay at the centre of its existence, remained in the hands of the Count Raymond and neither of Bernard's allies of Toulouse or Foix.