The church is one of the oldest in this part of Poland. It is said to have been founded around 1045 by Casimir the Restorer and consecrated around 1073 by Saint Stanislaus the Martyr. According to tradition, the building was built on the site of the hermitage of Saint Swierad, a Benedictine monk who lived at the turn of the 10th and 11th centuries. century lived. However, all that remains of the original building are the walls of the chancel, which was raised secondarily, and the remains of the north and west walls of the nave. The completion of the building dates back to the turn of the 11th and 12th centuries. In the 13th century a sacristy (today a storeroom) was added to the north wall. In the 16th century, part of the chancel walls were bricked up and vaulted with a lantern cupola, and a chapel of the Virgin Mary was added to the south wall of the nave, which now serves as the sacristy.
In the sale of the Tropstein estate of 1535 the church is mentioned as St. Gerald's, and from 1556 to 1603 it served as a Calvinist church for Protestants. At the beginning of the 17th century the church was taken over as the Church of the Polish Brethren.
In the 17th century, probably around 1634, a vestibule and "cloister" were added to the north wall of the nave, and the nave was extended to the west (Translated from Wikipedia).