At the same time, Ferdinand IV gave to James II his eldest daughter, the "Infanta" Eleanor of Castille, to be raised in the Aragonese court until she had the proper age to marry the "Infante" James of Aragon, firstborn son and heir of James II. In the meeting of Calatayud of 1311 it was also agreed to resume the war against the Kingdom of Granada, but it was decided that each Kingdom should do it separately, while James II promised to mediate between Ferdinand IV and his father-in-law in the conflict that both maintained about the possession of some cities of which Denis of Portugal had taken over during Ferdinand IV's minority. However, the death of Ferdinand IV in September 1312 put an end to such negotiations between the sovereigns of Aragon and Portugal. On 3 April 1312, shortly after the meeting of Calatayud, Juan Manuel of Villena married in the city of Xàtiva with the "Infanta" Constance of Aragon, another daughter of James II. After his stay in the city of Calatayud, Ferdinand IV went to the city of Valladolid, where the "Cortes" were to meet. In the "Cortes" of Valladolid in 1312, the last of the reign of Ferdinand IV, funds were raised to maintain the army to be used in the next campaign against the Kingdom of Granada, were reorganized the administration of justice, the territorial administration and the local administration, thus showing the King's desire to make profound reforms in all areas of administration, while attempting to strengthen the royal authority against the nobility. The "Cortes" approved the concession of five services and one "moneda forera", for the payment of the soldiers of the King's vassals, except for Juan Núñez II de Lara, who had become the vassal of King Denis of Portugal. As early as October 1311, Ferdinand IV had requested a loan from King Edward II of England, in order to continue the war against the Kingdom of Granada, although the English sovereign refused to grant it, arguing that he had many expenses due to his war against Scotland. In July 1312, Ferdinand IV pledge the Templar castles of Burguillos del Cerro and Alconchel for 3,600 marks to King Denis of Portugal, which he needed to continue the war against the Kingdom of Granada. At the end of April 1312, after the "Cortes" had been end, the King left the city of Valladolid.