Emperor Frederick II, a great admirer of the mountains and woods of Southern Italy, has linked his name to many castles of Basilicata. One with a most impressive and austere appearance, the castle in Lagopesole (Castel Lagopesole), rises in the Avigliano territory, along the very ancient road connecting Potenza to Melfi, at the crossroad of the sheep tracks to Campania and Tavoliere delle Puglie (Apulia Plain).The castle, probably of Arabian origin, was enlarged in the period between 1242 and 1250 by will of Frederick II, who used it to get a rest during his game-hunting expeditions. Many times it was home to his son Manfredi and his wife Elena of Epirus. It was also a summer residence of the Anjou kings of Naples. In 1861 it was the bivouac of a gang of brigands led by Carmine Crocco.The castle is one of the few in Southern Italy with a church (and not a simple chapel) inside. It has been the set of films, as Il Vangelo secondo Matteo (1964) directed by Pier Paolo Pasolini. In a nearby district , the ethnographical museum dedicated to the customs, traditions and trades typical of the area. In Avigliano, The churches of “Santa Maria del Carmine”, “Santa Maria degli Angeli” (with notable works of art inside), “San Vito”, “Santissima Annunziata” and “Santa Maria de Cornu Bonu” (mentioned in a document dated 1164) deserve a visit. Noteworthy are too the many stately mansions belonging to the old nobility.