William Isarn (Guillermo Isárnez) was the Count of Ribagorza from 1010 until his death in 1017 or 1018. He was a young man when he became party to a power-sharing agreement between his cousin and her husband, sponsored by the Count of Castile. He used a Castilian army to remove the Muslim garrisons from the valley of the Isábena, but before his work of Reconquista could be completed, he was assassinated while trying to reestablish his family's rights in the Val d'Aran. His death provoked a succession crisis that ended in the absorption of Ribagorza into the domains of the King of Navarre.
William was the illegitimate son of Count Isarn Raymond. He spent his childhood in the household of his paternal grandmother, Garsenda of Fezensac, but at puberty was sent to the court of his cousin, Count Sancho García of Castile, the son of his father's sister Ava, in order to learn the art of war. Isarn died in 1003 while fighting off an invasion by the Córdoban hajib Abd al-Malik al-Muzaffar, and was succeeded by his sister Toda. In 1006, another invasion of Ribagorza by Abd al-Malik forced Toda to find a husband in her kinsman Sunyer, count of neighbouring Pallars.
The sudden rise in influence of Pallars over Ribagorza alarmed Toda's relatives in Castile, and the countess sent a missive to her nephew Sancho asking for military assistance in conserving the independence of Ribagorza. The count of Castile sent his sister, Mayor García, who was married to Sunyer's eldest son, the future Raymond III. Toda proclaimed her heir and abdicated in her favour. Sancho also sent the young William, who was given a part in the comital government, with a Castilian army under his command.