In the Middle Ages, Opatów was a settlement on the Opatówka River, in an area of forests and lakes. It was founded as a stronghold of the early Polish state in the late 10th or early 11th century. First mentioned in 1189, it was the residence of the regional ruler (Castellan) and one of the largest settlements of the Sandomierz Land. First church was built here sometime in the 11th century. In the 12th century, St. Martin collegiate church was built as well. The purpose of the collegiate church is not known, it was probably designed for a Roman Catholic diocese which was created in Sandomierz instead.