 Then in 1179, Roberto of Pietrapertosa became the landlord of Craco.Under Frederick II, Craco was an important military center and the Castle Tower became a prison.In 1276, a university was established in the town.