Nanstein Castle was built around the year 1162 after Holy Roman Emperor Frederick I demanded its construction as additional defense for the Palatinate.
In 1504, German knight Franz von Sickingen, inherited part of the castle after his father's death in the War of the Bavarian Succession, finally acquiring the entire castle in 1518. He immediately began extensive refortification to make the castle suitable for firearms.
Nanstein is well known for an elaborate siege during the Knights' Revolt in 1523 which claimed the life of von Sickingen. The fall of Nanstein was a symbol for the decline of castles in the Palatinate.
In 1542, von Sickingen's sons recovered Nanstein as a fief and started reconstruction of the castle. Reinhard von Sickingen completed the reconstruction in 1595. In 1668, Elector Charles I Louis forced Lotharingian troops from the castle and razed the fortifications.
In the 19th century the first conservation work was done on Nanstein, and this has continued to the present day.
References:First record of Kastelholma (or Kastelholm) castle is from the year 1388 in the contract of Queen Margaret I of Denmark, where a large portion of the inheritance of Bo Jonsson Grip was given to the queen. The heyday of the castle was in the 15th and 16th centuries when it was administrated by Danish and Swedish kings and stewards of the realms. Kastelhoma was expanded and enhanced several times.
In the end of 16th century castle was owned by the previous queen Catherine Jagellon (Stenbock), an enemy of the King of Sweden Eric XIV. King Eric conquered Kastelholma in 1599 and all defending officers were taken to Turku and executed. The castle was damaged under the siege and it took 30 years to renovate it.
In 1634 Åland was joined with the County of Åbo and Björneborg and Kastelholma lost its administrative status.