The beginnings of the fortifications in Trnava date back to 1238, when the town received the privilege of building them from king Bela IV. Initially, these were timber and earth ramparts, gradually exchanged in the 14th century for the brick one. Despite the fortifications, the town was capured many times, among others in 1271 and 1273 by king Ottokar II of Bohemia. In 1430, in the foreground of the town, the Hungarian army fought with the Hussites, who despite the victory had to retreat to Moravia, due to great losses. Two years later, a group of Hussites disguised as merchants, entered the town, overpowered the guard at night and took over the city without a fight. The next attack on the town was carried out in 1506 by Maximilian Habsburg. This time, the defenders kept the town, although fortifications were badly damaged during the fights. In subsequent centuries, along with the spread of artillery, town walls were losing importance, but were maintained. The first demolition was carried out in the nineteenth century, when the moat was filled in and the gates were demolished in order to make street traffic easier.
The town walls of Trnava were built on a rectangular plan measuring 800 x 700 meters. It covered the area of almost 56 ha with a circumference of 3 thousand meters. It set Trnava among the larger urban centers of Hungary at that time. The brick defensive wall was around 8 meters high and the thickness reaching up to 2 meters. At the beginning it was crowned with a battlements, but in a later period it received a simple roof over the sidewalk of defenders. The latter was placed in the wall thickness behind the breastwork.
Fortifications were reinforced with 36 towers, spaced fairly evenly over the entire length of the perimeter. Originally there were 26 of them, in the second phase of the extension of fortifications in the 14th century, another 10 were added to the existing circuit. A smaller number of towers was only on the eastern side. Initially, it were half towers, open from the side of the town, over time rebuilt into quadrilateral towers. The length of their sides was from 725 to 811 cm. Inside, individual floors were separated by wooden ceilings and communication was enabled by ladders.
Four gates, located in four-sided, five-storey gatehouses, led to the town. Two from the north (Upper and Malženická) and two from the south (Lower and Lovčická). Later, smaller pedestrian wicket gates were added, one from the east and two from the west, while the main town gates received foregates in the fourteenth century. The outer zone of defense was a moat, filled with water at times of danger, from a pond located north of the town. Its width was about 20 meters, and the depth was at least 5 meters.
The defensive walls in Trnava belong to one of the best preserved in Slovakia. It survived on 2/3 of the circuit, especially on the western, northern, north-eastern, eastern and partly southern sections, along with numerous towers.
Stanik I., Pôvodný zámer výstavby stredovekého opevnenia Trnavy a jeho postupná realizacia [w:] Trnava a poèiatky stredovekých miest, Trnava 2009.
Website regiontirnavia.sk, Town fortifications.