The town surrendered on the 7th of September, but disease and the defeat of the fleet by the Aragonese navy at Las Farmiguas Islands led to a retreat, during which, on the 5th of October, the king died.
It became the usual residence of the Aragonese viceroys of the 13th and 14th centuries.
Unfortunately for Frederick, a part of the Aragonese nobles of Sicily favoured King James, and both John of Procida and Ruggiero di Lauria, the heroes of the war of the Vespers, went over to the Angevins, and the latter completely defeated the Sicilian fleet off Cape Orlando.
The Aragonese and Catalans, however, appealed to the pope, who forced Montfort to surrender him in May or June 1214.
War broke out between Joanna and the Aragonese on one side and Louis and Sforza, supported by the pope, on the other.
The war between the Angevins and the Aragonese for the possession of Sicily was still in progress, and although the Aragonese were successful in Italy James's position in Spain became very insecure to internal troubles and French attacks.
The castle dates from the Aragonese period.
The Aragonese enjoyed at first the assistance of the giudici of Arborea, who had remained in power; but in 1352 war broke out between Mariano IV.
Frederick's great merit was that during his reign the Aragonese dynasty became thoroughly national and helped to weld the Sicilians into a united people.
The Aragonese castle and the Genoese walls have been demolished in recent times, and the town has a modern aspect, with spacious streets and squares.