Castle of Melfi The castle of Melfi in Basilicata is a monument owned by the Italian State and one of the most important medieval castles in Southern Italy . Its construction , at least the components still visible , dates back to Norman times and has undergone significant changes over time , especially in Angevin and Aragonese times . History . The Norman period . The castle of Melfi dates back to the late 11th century , at the time of the Normans , who built it in a strategic location that serves as a gateway between Campania and Apulia . Its placement was essential to defend itself from external attacks and as a refuge for the Allies . The structure was a place of " historic " events during the Norman period . In Melfi , seat of the County of Apulia , there were five ecumenical councils , organized by five different Popes between 1059 and 1137 . In the summer of 1059 , Pope Nicholas II lived in the fortress . It was the center of important events : in June the Treaty of Melfi was concluded there , then , from August 3 to August 25 , the First Council of Melfi was celebrated there , and it was finally recognized as land conquered by the Normans with the Concordat of Melfi . The Pope named Robert Guiscard Duke of Apulia and Calabria . The town of Melfi went through a brilliant period of history : on that occasion was promoted to the capital of the Duchy of Apulia and Calabria . Robert Guiscard , to marry Sikelgaita of Salerno , sent there in exile his first wife , Alberada of Buonalbergo . In the Castle other synods were organized : Pope Alexander II from August 1067 chaired the Council of Melfi II , received the Lombard prince of Salerno , Gisulf II , and the brothers Robert Guiscard and Roger I of Sicily . During the Council of Melfi III , in 1089 , Pope Urban II summoned the First Crusade , then Paschal II in 1101 called the Council of Melfi IV and finally Innocent II in 1137 celebrated the Council of Melfi V , last of the series . There was also a Council of Melfi in 1130 not recognized by the Church , because organized by the Antipope Anacletus II , who established the Kingdom of Sicily . The Swabian period . With the arrival of the Swabians , Frederick II gave great importance to the castle of Melfi , and made some modifications . In 1231 , the manor was the site of the promulgation of the Constitutions of Melfi , code of laws of the Kingdom of Sicily , to which Frederick II personally took part in the writing together with people like his notary Pier delle Vigne and the philosopher and mathematician Michael Scot . The structure was also a deposit for taxes collected in Basilicata and prison , where were held prisoners like the Saracen Lucera Othman , which was released later after the payment of 50 ounces of gold . In 1232 , Frederick II hosted in the castle the Marquis of Monferrato and niece Bianca Lancia , who became his wife and with whom he had his son Manfred . In 1241 , the Swabian king imprisoned in the building two cardinals and several French and German bishops , who should have been part of a papal council for his dismissal . The Angevin period and subsequent periods . With the decadence of the Swabian and the arrival of new Angevin rulers , the castle of Melfi underwent massive renovations and expansions , as well as being elected by Charles II of Anjou official residence of his wife , Mary of Hungary , in 1284 . It was still subject to changes in the 16th century under the Aragon government and became the property of Acciaiuoli first , then of the Marzano , Caracciolo and finally , Doria , to which belonged until 1950 . The castle had to undergo two violent earthquakes in 1851 and 1930 but , unlike the other Melfi monuments that were severely damaged , the castle came out almost unscathed . Today , the building houses the National Museum of Melfese , opened in 1976 . Structure . The castle of Melfi , having witnessed several construction phases over time , has a multi - style architectural form , although it still looks purely medieval . It is composed of ten towers of which seven rectangular and three pentagonal : The castle of Melfi has four entrances , of which only one is still usable . The first , situated in the northeast near the Tower parvula , was directly connected with the country and is now walled up ; the second , also walled and located near the church tower , opens to the courtyard ; the third to the south west , close to the bulwark of the Lion , was the main entrance during Angevin age and allowed to reach the moat and the city . The fourth , the only active , was opened by the Doria and serves as access to the country via a bridge , a drawbridge in ancient times . The interior , though transformed by Doria , between the 16th and 18th century in a baronial palace , still retains some structural features in Norman - Swabian style . After crossing the bridge is visible a portal that contains an 18th century inscription that honors the deeds of Charles V and Andrea Doria . Then entering the courtyard , is possible to access the stables and the yards of the " lairage " and " the Mortorio " , all Angevin works created between 1278 and 1281 at the behest of Charles II of Anjou . Always in Angevin style are the " Throne Room " ( which houses the museum ) , built on the north side , below the " Hall of Armigeri . " Worth mentioning also the " Hall of the bowl , " where were proclaimed the Constitutions of Melfi .