 It was used in the defense of the city only once, during the Swedish invasion of Poland, on 30 June 1656, when it had to be recaptured by the Polish army of Polish king John II Casimir from the Swedes.In the 18th century, the barbican was partially dismantled as its defensive value was negligible, and the city benefited more from a larger gate which facilitated movement of people and goods in and out of the city.In the 19th century, its remains were incorporated into newly built apartment buildings ("kamienica").