Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. Castles in Spain
were built mainly for defensive purposes. During the Middle Ages,
northern christian kingdoms had to secure their borders with their
muslim southern neighbours, thus forcing both christian and muslim kings
to grant border fiefs to their liege noblemen so as to keep and maintain
defensive fortresses. When the Reconquista advanced, those border
castles lost their initial purpose, and, as it happened in the rest of
medieval Europe, they were used also as noble residences and fief-keeps.