By the early 14th century, Sagunto (still known as Morvedre) had a growing Jewish population, resulting in the establishment of a Jewish cemetery under the castle walls in 1328. Peter IV of Aragon reinforced the castle defences in the 14th century. In 1363, King Peter of Castile took the castle after laying siege to it. In 1562, Juan Bautista Antonelli was commissioned by King Philip II of Spain to improve and modernise the castle's defences; it was at this time that the castle precinct was divided into seven plazas. During the Spanish War of Succession, in the early 18th century, the castle was surrendered to the Archduke of Austria, but soon afterwards it passed under the control of King Philip V of Spain. In 1811, during the Peninsular War, Brigadier Andriani defended the castle against French troops commanded by General Suchet, who laid siege to the fortress on 23 September of that year. Andriani withstood the siege and several assaults, although Suchet was ultimately victorious. After taking the castle, Suchet ordered it to be repaired and strengthened the defences. These modifications were overseen by Andriani.