The castle at the northwest corner of the old town dates from the 11th and 12th centuries, built on a rocky spur above the confluence of the Cinca and Ara rivers. The outer walls and towers are largely intact; the interior courtyard has been restored and hosts occasional events.
The ramparts offer the best views in Aínsa — east down the Cinca valley, north toward the high peaks of the Pyrenees, and directly below to the point where the two rivers meet in a broad flat valley of poplars and gravel beds. On a clear day the Monte Perdido massif is visible to the north.
Entry is through the courtyard; a small interpretation centre inside covers Sobrarbe's medieval history, including the Kingdom of Sobrarbe, which had its capital here before merging into the Crown of Aragon in the 11th century.