Castell de Puig-reig, documented from the year 907, served as one of the most advanced outposts of 9th-century repopulation in the Llobregat valley along the Marca Hispánica frontier in Berguedà, Catalonia. From the 12th century, the castle was property of the Berguedà viscounty until 1187, when viscount and poet Guillem de Berguedà bequeathed it to the Order of the Temple. The Templars took effective possession in 1231, establishing it as an important monastic military stronghold. Today, the castle has largely disappeared into ruins, though scattered ancient stones and documented archaeological coordinates preserve evidence of its significant medieval presence in the landscape.