Once a fortress for defensive purposes, surrounded by the sea that occupied the moat all around the castle and insulated it from potential enemy attacks, it constitutes a strategic point in city life as well as an important urban core.
[10] For this reason Count Peter the Norman in view of a later attack on the city of Trani, held strenuously until 1054, under Byzantine rule,[11] took possession of the undefended lands of Barletta, erecting a fortress for defensive purposes in the southeastern area of the present building.
Following the destruction of Bari, William, between 1156 and 1162, enlarged the castle's edifice, building two more towers, connected by a simple wall, to which a fourth was later added on the southwestern side, thus constituting a pseudo-trapezoidal layout fortress.
[15] Of the Norman period, which ended with the death of Tancred, cousin of William II, in 1194, only the southeast tower of the castle remained, severed in height and incorporated during the 16th-century interventions in the southern curtain of the Spanish structure.
[16] The profound restoration of the castle that took place in the 1980s, given the direct inaccessibility of the tower, allowed its internal visibility through the recovery of a hole on the ground floor protected by a metal grating.
This event led to extensive involvement of the church in royal affairs and makes it possible to trace the first historical record in which explicit reference is made to the castle of Barletta, in some letters of Innocent III in 1202.
[20] In 1202 the dispute for dominion over the Kingdom of Sicily flared up, pitting the Germans led by Markward von Annweiler and Dipold of Acerra against the French of Walter III of Brienne.
After being crowned in 1215 king of the Romans and Germany in Mainz and in 1220 consecrated emperor by Pope Honorius III, Frederick II banished the Sixth Crusade from Barletta in 1228 and in the following year, on his return from the Holy Land, stayed in the city for two months.
[11] Before 1224, the year in which the construction of the Frederician wing of the castle was promoted, the only historical document in which Barletta appears again dates from 1205 and in it the sovereign authorized the church of St. James to build a mill, a tavern and an oven.
[22][23][note 2] For this reason, between 1224 and 1228, the sovereign intervened by demolishing the eastern area that had belonged to the Normans and building there the Frederician domus, accentuating the decorative and architectural aspects of the castle and transforming what had previously been a fortress for defensive purposes into a palace for his court.
[26] The importance of Barletta and its castle on the one hand, and the rancor that Charles I of Anjou felt for the Swabians on the other,[27] induced him to intervene architecturally on the entire fortress, as well as on the urban enclosure, starting in 1268.
[28] In this regard, the considerable documentation found[29] shows the gradual transition from the intention to proceed with ordinary maintenance to the substantial modifications of the masonry work, which included the construction of the Angevin palatium on the north side, which disappeared following the subsequent Spanish extension and whose foundations, following restoration in the 1980s, were used as a water cistern,[26] the replacement of the collapsed Norman antique tower to the southeast with a circular tower,[note 3] the excavation of a moat around the castle with the building of an outer defense wall to the west, also called talutum,[note 4] the reinforcement of the existing curtain walls and the building of an additional gateway to the castle named Porta Trani, facing east toward the city of the same name.
[37] The ruler was in Apulia two years later and, moving along the coast out of fear of enemy attacks from inland, he settled in the castle of Barletta, indulging in leisure and entertainment with the town's patricians,[38] heedless of the approach of John of Anjou's troops.
[36] The events that brought the Spanish dynasty to power and led to the Challenge of Barletta were part of the clashes between Ferdinand II of Aragon and the French of Louis XII,[42] culminating in the victory of the Spaniards in the battles of Cerignola and Garigliano in 1503, thus succeeding in completing, by the end of the same year, the conquest of the entire Kingdom of Naples in favor of Spain.
[46] On that occasion, the castle was occupied by the French, who managed to gain access to it, aided by a faction of Barletta's people, through the walls to the east of the city, which were then undergoing strengthening works, but suffered no structural damage.
[47] Under the leadership of the Habsburgs, the castle underwent a major transformation to prepare for possible enemy attacks no longer solely with cold weapons such as swords or spears but also with the use of gunpowder and cannons.
Sixteenth-century construction methods involved castles that were no longer elevated in height, with watchtowers that were difficult to scale, but solid and particularly imposing structures, usually surrounded by large flat areas for more effective enemy control from the ground.
[49] Charles V thus put in place an intervention to thicken the walls to a section between seven and twelve meters in size and to incorporate the old structures: the Angevin ones were encased in the newly built ones while all those parts that did not comply with the idea of grandeur and symmetry were demolished.
Their traditional denomination, which coincides with that used by architect Grisotti during the restoration work in the 1980s, dates back to 1559 in which they appear mentioned in a document, named respectively, from the southwest clockwise, St. Mary's, St. Vincent's, St. Anthony's, and Annunziata.
[54][55] In the late sixteenth and early seventeenth centuries, new work began on the completion and maintenance of the castle, which also saw the promotion of a less arduous condition of habitability and the reclamation of marshy land in the city and areas near the same structure.
[65] The French general, after visiting the castle of Barletta on April 14, 1813, ordered works to consolidate the defensive structures, in view of a possible clash with European powers, which allowed the return of the Bourbons to the command, until the Unification of Italy.
XXIV May MCMXXXII XI E.F.In September 1943, during World War II, the castle was home to a military garrison that put up strenuous resistance to the German army, which was determined to occupy the town following the armistice between the Italians and the Allies.
[72] When the work was completed, the castle returned to the use of the city and tourists, due in part to the installation of the Civic Museum, temporary exhibitions and lectures, and the use of the Frederician wing as the municipal library.
[76] It is surrounded by the gardens, named after the Cervi brothers, on all sides except the north front, and is separated from them by the wide and deep moat, which at its lowest point reaches ten meters in depth from the floor level of the castle access bridge.
These underwent restoration works aimed at upgrading the state of the places and the lighting system, to be transformed into a park with equipped areas, and after two years, on December 7, 2002, they were returned to the citizens of Barletta, who made them a focal point of the historic center.
Left unused and then partially destroyed after the wartime episodes on June 12, 2004, the fountain was reconstructed and reactivated, partly due to painstaking restoration work on the stone blocks, thus fulfilling its function as a drinking water distribution point.
[91] This is divided into two lateral compartments from the central atrium, each having a hole in the wall opposite the entrance, while the roof is enclosed by tuff masonry provided with embrasures, except on the side facing the bridge where the parapet is lower to allow military maneuvers with the interior.
Stored at the lapidarium on the ground floor of the castle, it is a stone slab 87 centimeters in height, 216 in length and 10 in thickness,[104] divided into three blocks, one of which is drilled in the center because of its use as the upper closure of a well.
The eastern facade is divided horizontally into two parts of avowedly different workmanship: the southernmost one dates from the Swabian-Angevin period, with the presence of the Frederician domus;[24] the remaining portion to the north denounces more distinctly Spanish features.
Inside, just below the floor level, the foundation structure of the ancient Angevin round tower was found, with an external reinforcing buttress inclined to a scarp, used in the past as a cistern,[134] and left exposed after the work of architect Grisotti.