In 10391040, Ermengol and Raymond Berenguer signed a pact against Raymond of Cerdanya.
During the years 1039 to 1040, Ermengol and Raymond Berenguer agreed upon an alliance to oppose Raymond of Cerdanya.