During the Deluge the wooden church was destroyed by Swedish forces, but was rebuilt soon afterwards. In 1695 the deacon of Warsaw Reverend Mikołaj Popławski founded a new church in its place, with the money donated by Queen-consort Marie Casimire Louise de La Grange d'Arquien. However, after King John III Sobieski died, the funds were withdrawn and it was not until 1755 that the construction works were finally finished. The building was designed by Joachim Daniel Jauch. After his death the works were supervised by Johann Friedrich Knöbel. During the Siege of Warsaw (1794) the area around the church was converted into a rampart for the Polish forces and the church was heavily damaged. Rebuilt in 1807, it was again rededicated in 1811. However, during the Russian siege of Warsaw in 1831 the area was again converted into a fort and the church was again heavily damaged.