Castle of Montearagón stands as a fortress-monastery complex near Huesca, representing a remarkable blend of military and religious architecture in Romanesque style. King Sancho Ramírez of Aragon constructed it strategically to facilitate the siege and capture of Huesca from Muslim control during the Reconquista. In 1094, Sancho Ramírez was killed by a stray arrow while reconnoitering the city's defenses from the castle's walls. The fortress succeeded in its military mission when Peter I conquered Huesca in 1096 after defeating relief forces at the Battle of Alcoraz. Following its military obsolescence, the complex served as an abbey for 750 years until Spanish confiscation in the 19th century. Current restoration projects preserve the significant remains of this important chapter in Aragon's history.