Gamberk castle is closely related to Galls family, one of important ministerial families of late Middle Ages. The castle may have been built by Ortolf III of Svibno already in the mid-11th century. Modern historians however believe that it's was not built before the second half of 12th century when Gall family was came from Bavaria to Carniola as ministerials. First indirect mention of the castle is from 1248 when it is referred to as Gallenberch but its typical design allows the castle to be built before year 1200.
In the 14th century Gamberk castle was still a property of Gall-Gallenberg family, even if they have moved their seat to a newly built Gallenstein castle near Podpeč in Lower Carinthia already in the second half of 13th century. Gamberk at the time still controlled provincial court of law even though the castle itself began to lose its importance, but the have supposedly Galls lost the dominion in the same century. It is definite that the castle was owned by house of Šternberg at the beginning of 15th century and they have sold it to Habsburgs in 1443.
House of Habsburg was leasing the castle or giving it out to stewards. In 1461 the castle's steward was Konrad noble Apfaltrer and in 1546 the castle was in the hands of Franc noble Altenhaus. Two years later Ferdinand I along with tithe on Trojane pawned the castle to Hans noble Rechberg. But already in 1553 the castle became a lien of Jakob noble Lamberg. With the consent of the emperor he extended medieval tower design into a luxurious Renaissance residence.
Gamberk remained as a property of Lambergs until 1630s and then in 1640 it was sold by its owner at the time Jurij Žiga count Paradeiser to Jernej - Bartolomej baron Valvasor, father of Slovene historiographer. He was in 1661 succeeded by Luenburg family and in 1677 Poor Clares order from ljubljana have bought the castle but sold it the same year to Gašper noble Lichtenturn.
Andrej Ksaverij, the next Baron of Lichtenturn repaired the castle. Inside. The castle was in Lichtenturn's hands until 1769 after which some other owners followed, like Montanists between 1804 and 1830. In the middle of 19th century it was a property of mining share holders company which was using the castle as a vacation resort. After 1875 a few private owners followed until it was completely abandoned two decades later. But as we can see from a sketch by Hinko Kartin its surrounding walls were fifty years later still as high as projecting roof in the second floor.
Currently the castle is undergoing reconstruction works.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.