Castell de Santa Perpètua de Gaià is a medieval fortress documented from 976 onwards, situated approximately 580 meters above sea level on a rocky hill near Pontils in Catalonia's Conca de Barberà region. The castle features a distinctive triangular tower atop a cliff commanding views of the Gaià valley, and formed part of Barcelona's frontier defensive system against Al-Andalus territories in the Marca Hispánica. Destroyed by Almansor and rebuilt in 1012, the fortress represents the complex border fortification network of medieval Catalonia.