During The Deluge, between 1655 and 1661, the city was occupied by Muscovy and the church was badly damaged. Burnt from the inside, it was partially demolished. Local bishop of Grodno Aleksander Chodkiewicz financed the reconstruction and by 1674 the church regained its former look. However, in the 18th century the church was again destroyed during the Great Northern War. The king of Poland financed the reconstruction, but it is not clear whether the works were finished when in 1753 a fire struck the city and the church was yet again badly damaged. It took 5 years to rebuild it. Local priest Józef Chrebtowicz hired a renowned German architect Johann Mezer to supervise the works. The church was once again consecrated on April 18, 1758.