[1] In the 17th century the fourth owner of Kodeń, Mikołaj Sapieha, returned to his home town with a painted icon portraying the Spanish statue of Our Lady of Guadalupe, said to have been painted by Archbishop Augustine of Canterbury at the request of then-Pope Gregory.
According to local legend, Sapieha stole the image from Pope Urban VIII in 1630 and was subsequently excommunicated.
However, afterwards the pope lifted the excommunication and gave the icon along with many relics to the basilica in Kodeń in recognition of Sapieha's efforts in opposing the proposed marriage of King Władysław IV Vasa and Princess Elisabeth of the Palatinate.
Under Russian rule, with the liquidation of the Union of Brest on 6 May 1875, Saint Anne's Church was converted to Orthodox denomination, and Catholic clergy took the icon to Poland's greatest Marian shrine in Jasna Góra.
In 1927 Missionary Oblates of Mary Immaculate settled in Kodeń and restored the church, and the icon was returned after 52 years.
In 1973, the church of St. Anne was granted the status of a minor basilica by Pope Paul VI.