Deep inside the castle bastions, at the level of the moat, is a network of high vaulted passageways known as casements. With their strategically located embrasures and sally-ports, these passages were intended both for defense and for counter-attack. Directly beneath the Tiergärtnertor, a rock-cut stairway connects the sixteenth century fortifications with a medieval system of water-supply conduits, the so-called "Lochwasserleitung". The tunnels(whose locations were a closely guarded secret) served to collect and conduct water. Because of the geological situation in the vicinity of the Castle Hill, rain water percolates down through the sandstone very slowly and collects above seams of clay which are water-impermeable. The resulting "suspended water tables" provided the northern part of the Old Town with a source of water which could be tapped by rock-cut passageways (and wells) at a reasonably shallow depth. The secret tunnels through the sandstone bedrock were first mentioned in 1459 and were still of use in the 20th century.