He took part in the Barbastro War of 1064 under the banner of his brother-in-law Sancho Ramírez of Aragon. When Barbastro was captured, he was given the lordship of the city. He died before 12 April 1065 defending the city from Moorish reprisals and was buried at the Monastery of San Pedro de Ager.