In the Middle Ages, such tunnels were usually constructed by the builders of castles or palaces who wished to have an escape route if their domains were under attack.
Prisoners have dug escape tunnels to flee captivity.
Throughout the British Isles and much of northern Europe, escape tunnels were often part of the intrinsic designs of fortified houses and palaces.
They were typically one half to two kilometers long, opening in a location not readily visible to attackers.
Examples are at Muchalls Castle (Scotland) and the Bishops Palace at Exeter (England).