The exceptionally well-preserved town walls give Vimperk a special old-time charm marked with the mediaeval desire for a safe haven from the harsh outer world. The right to build fortifications was gained in 1479, along with town-status, by Petr Kaplíř of Sulevice from the Czech King Vladislav of Jagellon. The settlement situated on the Gold Trail was consequently enclosed into a belt of walls at a time when the rapid improvement in firearms was beginning to mark the twilight of mediaeval fortification. All of this cannot change the fact that the construction of the walls added to the picturesqueness of Vimperk, creating the impression of a neat, compact unit set in beautiful natural scenery. The town walls were essentially an extension to the castle fortifications, and the defence system was reinforced with bastions and four gates. The one below the square was used by caravans of pack animals leaving the town on their way to Passau along the Gold Trail.
The test of the fortifications could have come at the onset of the Thirty Years’ War, when Vimperk was successively besieged by the army of the Estates and that of the Emperor (in 1619 and 1620), but it did not. The defenders surrendered after a short battle on both occasions, preserving the walls, which could not have survived bombardment by modern artillery of those times. In the centuries to come town walls changed from being a military means of defence into a barrier to the rapid growth of the towns, and those that survived the 19th-century mass demolition, into a tourist attraction. Vimperk was lucky to have retained a more or less well-preserved circle of walls all around (with the exception of a few sections in the west), six bastions and the tower-like Black Gate below the castle. Some of the remains still appeal to the eye, such as the mighty bastion above the square, with a bizarre array of small houses at the gate that was later made through the walls above the Volyňka River valley.