 The importance of the Castel dell'Ovo began to decline when king Charles I of Anjou built a new castle, Castel Nuovo, and moved his court there.Castel dell'Ovo became the seat of the Royal Chamber and of the State Treasury.It also served as a prison.