Damaged during Swedish wars, the building has been rebuilt and renovated in the second half of the 17th century: