Castle or warehouse? Built in the early 1500s—barely three decades after mercury was stumbled upon in Idrija—Gewerkenegg (“mine‑castle” in German) rose on the town’s most strategic ridge. Thick walls guarded mercury ingots, grain and gunpowder, while its chambers housed the mine’s directors, ready to repel Venetian or Ottoman raids. In 1575 the Habsburg ruler bought every share of the mine and turned the fortress into the administrative hub of the new Idrija estate. Restored arcades and sunlit courtyards now open a window onto five centuries of industrial wealth and Alpine Renaissance flair.