The church in the form of a rotunda was built in 1639–1641. The sanctuary in Stoczek has the title of a minor basilica granted by Pope John Paul II on May 19, 1987. In the monastery part of the sanctuary there is a memorial room for Cardinal Stefan Wyszyński. Since 1957, the sanctuary has been cared for by Marian priests.