San Martino d'Agri is a hill town and comune in the province of Potenza, in the Southern Italian region of Basilicata.
It is a town of less than 800 people most of the year, but in August the population swells to around 2,000 when Sammartinesi return for the Festa della Madonna della Rupe, some coming from as far as North America, South America and Australia.
San Martino d'Agri is on the peak of a hill at 666 meters above sea level.
Atop the hill stands a medieval castle, which was first owned by the barone.
The castle was later renovated and divided up into sections for different families' housing.