Erected in the second half of the 14th century as a part of the town’s defence system, the gate provided access to the town on the south side. The demolition of the medieval defence system was first considered at the beginning of the 19th century. It took place in 1807 at the hands of French troops who occupied the town. The gate roof sustained a damage during a fire in 1838, never to be restored to its former shape. The hip roof was covered with ceramic tiles in 1936–1937. The Saint Mary’s Gate was scorched and the walls were pockmarked with bullets in 1945. It was reconstructed in 1964 without the historical penthouse and hip roof.