Castell de Palagret, also known as Castell de Mabarrera, is a 10th- to 11th-century fortress perched at 178 meters altitude on a hilltop in the Palagret valley, near Celrà in southern Girona. Strategically positioned to control ancient Roman pathways connecting Girona to the Baix Empordà region through the Gavarres, the castle was likely constructed following Almansor's campaigns in 985, when fortification of key locations was ordered throughout Catalonia. The fortress sits directly on bedrock with a slightly trapezoidal rectangular plan and preserves wall heights of approximately 4 meters, surrounded by a moat spanning 92 meters in perimeter. Archaeological evidence reveals both medieval and pre-Romanesque elements within the structure. The castle was occupied until the late 15th or early 16th century, and today it stands as a protected national cultural heritage site, offering visitors insight into medieval defensive strategies and the region's strategic importance.