The local people built a series of town fortification walls immediately upon the establishment of the town. It enclosed the town from all sides and allowed entrance only through three gates. The most imposing gate stood at the bridge across the Otava and was named Prague or Lower Gate, while on the opposite side of town another gate was named Budějovice or Upper Gate. These two gates were taken down due to traffic around the middle of the 19th century.
The best known gate, called Putim Gate, was in the southwestern part of town and unfortunately was the first to be taken down, in 1836. Now the gate has found local fame in the student song "When I went through the Putim Gate". The Gothic castle moat here was renovated in 2006, while the nearby park has become a favourite place for relaxation, cultural events, or picnics.
The castle bastion on this site is decorated with a Písek flag in blue and gold. Parts of the defense bastions have survived – one near the monument of the lion on Budovcova ulice, and another opposite the post office. We can also see the remnants of the town walls above the river and in Palackého Gardens.