Loarre Castle is among Spain's most important Romanesque fortresses, commanding the foothills of the Pyrenees in Huesca province. Built under Sancho the Great around 1020 and substantially expanded from 1070 under King Sancho Ramírez, the castle features an irregular floor plan with double walls and cylindrical towers. Its 12th-century Romanesque church of Santa María sits within the complex, featuring barrel-vaulted naves and decorative capitals. Perched atop a rocky outcrop, the fortress commands panoramic views across the vast plains toward Huesca and once served strategic importance on the frontier between Christian and Muslim lands. Later converted into an Augustinian monastery, the castle remains a masterwork of medieval military architecture.