The medieval moats that originally surrounded the Špilberk fortress were removed in 1742 in connection with the construction of the casemates. The moat on the south and north sides was modified and then bridged with two-storey massive brick arches. The eastern and western moats were thus connected only by a drainage channel running through the lowest floor of the southern casemates. It diverted water from the western ditch to the mouth of the waste gallery in the eastern ditch. It was called the "Rat Canal" and was the stuff of legends. One of them depicts the particularly brutal torture of prisoners who were lowered into the canal and left to the mercy of predatory rodents. Apparently, many rats did survive in these places, but that is where the legend ends. Neither this nor any other method of torture ever took place in Spilberga Prison.
At the time when Špilberk was being converted into a Baroque fortress, it was necessary to ensure the drainage of the remaining ditches. The original drainage gallery at that time probably consisted only of a short channel passing through the castle wall, with its outlet on the bare hillside of Špilberk Hill. After 1742, however, the waste channel was dug through the rock mass and led up to Pekařská Street. It is really a very interesting building. The solid rock mass had to be bricked up in some parts with bricks or stone. The dimensions of the adit are very variable, as is its gradient. Even the direction is not straight and the passages curve to the right and left.
The time of the stone gallery's creation in the middle of the 18th century is still only hypothetical. It is not yet possible to prove whether it was created much earlier and could have served as a secret or emergency route from the besieged castle. However, the hints of other passages and impassable branches only confirm the fact that Špilberk still hides a number of historical and hitherto unknown underground spaces.