 The king's banker, Piotr Tepper, made efforts to build the church and in 1777 he obtained the appropriate privilege from King Stanisław August Poniatowski.The king however reserved for himself the right of choosing the design of the building.The church was designed by Szymon Bogumił Zug and constructed in 1777–1782.