The only document that gives information about the purchasing of this extraordinary work is an imperial decree of the 28of January 1240, with which Frederick II ordered the construction of a castle dedicated to Santa Maria del Monte. Many hypotheses have been formulated about the function of this castle. Probably used as a residence during the hunting, it has a relevant position on the top of the hill from which almost all the region is visible; this means that it should have been a symbol of the power of the king. After the death of Frederick II, the castle was used as a prison and then left uncontrolled as recovery for the beasts. But in 1552 the Carafa family from Andria bought it and after almost three centuries, in 1876, sold it to the State, that started the renovation ended in 1972.
Puglia is a region that stretches along the coast for about 860 km, with sandy