Of 88 medieval Sardinian castles, this is the only one that is still habitable and now a fascinating museum, with forms dating back to the middle of the 14th century. The castle, known as the castle of Eleonora d' Arborea, even though it is uncertain whether or not this judge ever stayed there, is located in Sanluri in the Medio Campidano province, 50 kilometres from Cagliari. The first building of the castle took place in the 12th century, in the Giudicati period, as a strategic stronghold on the border between the Giudicati (independent states) of Cagliari and Arborea. Later on, Sanluri was the centre of struggles between the Aragonese Crown and the Giudicato of Arborea. According to a document dating back to 1355, Peter IV of Aragon wanted the fortification – that was completed in just 27 days - of the castle, which, in 1409, was the scene of a bloody and decisive encounter between the troops of Arborea and the Spanish troops, who conquered the fortified residence for good. The military function vanished to become a dwelling, the property of several Spanish noble families: De Sena, Henriquez, Aymerich and, lastly, in 1920, the Villa Santa family, who are the current owners.