At the end of the 16th century a masonry church was built to replace the wooden one which had burnt down. In 1611 the church and the alms-house devolved to the Uniates—Orthodox Catholics recognising the supremacy of the Pope; unfortunately they did not take care of the buildings. Historical sources inform us that the church was transformed into a tavern, and the alms-house turned into a brothel. The restored sanctuary was given a special honour in the 18th century by Czar Peter I, who during his visit presented a gift of the colours taken from the Swedes in the Great Northern War. A legend spread that it was here the Czar himself christened an ancestor of the poet Alexander Pushkin — Hannibal of African origin (the marble board). In 1864 the decrepit church was rebuilt in the Neobyzantine style (by architect Nikolai Chagin).