From 1343 it was the residence of Joanna I of Naples, who in 1347, fled to France, abandoned it to the assaults of the army of the King Louis I of Hungary. He had come to avenge the death of his brother Andrew, the Giovanna's husband, killed by a palace plot that the queen herself was suspected of instigating it. The castle was looted and on its return the queen was forced to a radical restructuring. During the second expedition of Louis against Naples the castle, where the queen had found refuge, resisted the assaults. In the following years the fortress underwent other attacks: on the occasion of the taking of Naples by Charles III of Naples and then that of Louis II of Naples, who subtracted it from the son of Charles III, Ladislaus of Naples. The latter, regained the throne in 1399, lived there until his death in 1414.