Basilica - current Bernardine church was erected in the years 1618–1628. It was founded by Łukasz Bnin Opaliński, Great Marshall of the Crown and his wife, Anna from the Pilecki family.
The church was built in the place, where, according to the legend, in 1590 Tomasz Michał ek saw the Virgin Mary with St. Joseph . In 1594, a wooden church was built in the place of revelation, and 16 years later, the first stone church was erected by the Bernardines, who came here from Przeworsk in 1608.