Founded in the second half of the 10th century, it was part of the county of Barcelona, and was integrated into the network of castles that marked the border between the Catalan counties and Al-Andalus, with the function of protecting and organizing the territory.
Piera Castle dates back to at least the 10th century. Perched at the top of a small hill, it overlooks the valley of the Anoia river where it flows into the Penedès region.