Castell de Miralles is a two-part fortress in Santa Maria de Miralles, Barcelona province, erected during the mid-10th century as a frontier defense during regional repopulation. Documented from 960, the castle formed part of a critical defensive line that enabled westward expansion in the late 10th century, historically held by the Cervelló and Miralles families. The upper part retains rectangular structures with preserved walls spanning approximately 1,000 square meters, while below stands an esplanade with a collapsed defensive wall and square tower alongside a Romanesque church featuring a barrel vault and round-arched portal, exemplifying medieval ecclesiastical and military integration.