The ancient Pieniny castle was built on northern slope of a steep hill. The complex was small, due to lack of space, but placed in a spot which provided natural defence. The length of the defensive walls was 88 meters, and the walls were 1 meter thick, made from the local limestone rock. The gate was located in western part of the castle, below which cellars were built. According to Jan Długosz, during the disastrous Mongol invasion of Poland (1259), Prince Boleslaw V the Chaste fled to the Pieniny Castle (spelled as Castro Pyeniny), together with his mother and wife Kinga of Poland. Historians however doubt Długosz, claiming that construction of the castle was not initiated until the 1280s. The complex guarded southern border of Lesser Poland, and probably was abandoned by the first half of the 14th century, to be destroyed in the 15th century (most likely in 1433, during a Hussite raid.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.