The original fort is thought to have been built by the exquisitely named Wilfred the Hairy (Wifredo el Velloso) in 886 AD.
During the 14th century it housed the Dukes of Cardona, an important Spanish family.
In 1711, the Bourbon troops which supported Felipe V besieged the castle and did little to improve its look.
The siege was lifted after an allied army arrived and defeated the Bourbon forces in a battle which is explained in one of many boards around the castle detailing its history.
The castle quite naturally has a ghost, and a very fastidious one at that as it only haunts a specific room, number 712, and guests are warned about possible unwanted company if they reserve it.
Standard ghostly activity includes moving furniture, voices and taps that run by themselves.
The cleaning staff now clean the room in pairs, and when I was there in October 2015, I happened to see a cleaning lady having problems with her cleaning cart outside the room, and so quite naturally I disappeared quickly and decisively.
The ghost has a name, Adalés, and a typical Romeo and Juliet/ West Side Story story. She was an 11th century Christian who fell in love with a Muslim boy, and so her father locked her up to avoid trouble, causing her to pine