Ferdinand IV of Castile

Ferdinand IV of Castile (6 December 1285 – 7 September 1312) called the Summoned (el Emplazado), was King of Castile and León from 1295 until his death.

Ferdinand's upbringing and personal custody was entered to his mother Queen María de Molina, however, he was tutored by his granduncle Henry of Castile the Senator. Queen María attempted to placate the nobility, confronted her son's enemies, and repeated prevented her son from being dethroned. He faced the insubordination of the nobility, led at numerous times by his uncle John of Castile, Lord of Valencia de Campos, and by Juan Núñez II de Lara, who were sometimes supported by another royal relative, Juan Manuel, Prince of Villena.

Like his predecessors on the throne, Ferdinand IV continued the Reconquista and, although he failed to conquer Algeciras in 1309, he captured the city of Gibraltar that same year. In 1312 the city of Alcaudete was also conquered. During the Cortes of Valladolid of 1312, he promoted the reform of the administration of justice, among other areas of administration. He attempted to strengthen the royal authority to the detriment of the nobility. He died in Jaén on 7 September 1312 aged 26, and his mortal remains are now in the Royal Collegiate Church of Saint Hippolytus.

Infancy (1285–1295)
Ferdinand was born in the city of Alcazar de San Juan on 6 December 1285 as the second child and eldest son of King Sancho IV of Castile and his wife María de Molina. He was baptized at Seville Cathedral by Archbishop Raimundo de Losana and was immediately proclaimed heir to the Crown and received the homage of the nobles of the kingdom.

King Sancho IV entrusted to Fernán Pérez Ponce de León the raising of his newborn son, since he had been first majordomo of King Alfonso X. The prince and his tutor left for the city of Zamora, where the family of Fernán Pérez resided. Likewise the King appointed Isidro González and Alfonso Godínez as Chancellors of the prince, while appointing Samuel de Belorado almojarife (Treasurer) of the prince. Fernán Pérez Ponce de León and his wife, Urraca Gutiérrez de Meneses, had a significant influence on Ferdinand's character, and he would show them, as a King, a profound gratitude.

Already in his infancy the question of his marriage was raised, being the desire of Sancho IV to choose a princess from Kingdoms of France or Portugal. In the agreement signed by Sancho IV and King Denis of Portugal in September 1291, it was established the betrothal between Ferdinand and the Infanta Constance, daughter of the Portuguese sovereign. Nevertheless, in spite of the commitment contracted with the Portuguese monarch, in 1294, Sancho IV thought about the possibility of marrying his son with Margaret or Blanche, daughters of King Philip IV of France. The death of Sancho IV a year later put an end to the negotiations with the French court.

Under regency (1295–1301)
King Sancho IV of Castile died in the city of Toledo on 25 April 1295, leaving his eldest son Ferdinand as heir of the throne. After the burial of the sovereign at Toledo Cathedral, his widow María de Molina retired to the Alcázar of Toledo for a mourning of nine days. The now Dowager Queen was in charge of the regency of her 9-year-old son. Because the marriage between Sancho IV and María de Molina was without validity, all their children (including the now Ferdinand IV) were illegitimate, so the Dowager Queen had to face numerous problems to keep her son on the throne.

To the incessant struggles with the Castilian nobility, led by the Infante John of Castile, Lord of Valencia de Campos (who claimed the throne of his brother Sancho IV) and by the Infante Henry of Castile the Senator, son of Ferdinand III and great-uncle of Ferdinand IV (who demanded the guardianship of the king) were joined the claims of the Infantes de la Cerda (Alfonso and Ferdinand, sons of the deceased first-born son of Alfonso X, Ferdinand de la Cerda), who were supported by France and Aragon and by their grandmother Dowager Queen Violante of Aragon, widow of Alfonso X. To this were added the problems with Aragon, Portugal and France, who tried to take advantage of the political instability that suffered the Kingdom of Castile in their own benefit. At the same time, Diego López V de Haro, Lord of Biscay, Nuño González de Lara, and Juan Núñez II de Lara, among many others nobles, sowed confusion and anarchy in the kingdom. In the Cortes of Valladolid in 1295, Henry of Castile the Senator was appointed guardian of the King, but the Dowager Queen María de Molina got (thanks to the support of the cities with votes in the Cortes) that the custody of her son was entrusted to her. While celebrating the Cortes of Valladolid, John of Castile, Lord of Valencia de Campos, left the city of Granada and tried to occupy the city of Badajoz, but, when failing in this attempt, he seized Coria and the castle of Alcántara. He later passed to the Kingdom of Portugal, where he pressed King Denis of Portugal to declare war to Castile and, at the same time, to support his claims to the Castilian throne.

In the summer of 1295, when the Cortes of Valladolid were finished, the Dowager Queen and Henry of Castile met in Ciudad Rodrigo with King Denis of Portugal, to whom they delivered several localities located near the Portuguese border. In the meeting of Ciudad Rodrigo the betrothal between Ferdinand IV and Constance of Portugal (daughter of King Denis) was renewed, and in addition Infanta Beatrice of Castile, younger sister of Fernando IV, would marry Afonso, heir to the Portuguese throne. At the same time, Diego López V de Haro was confirmed the possession of the Lordship of Biscay, and John of Castile, who recognized (but only privately) Ferdinand IV as his sovereign, was momentarily restored his property. Shortly after, King James II of Aragon returned the Infanta Isabella of Castile to the Castilian court without having married her, and declared the war to the Kingdom of Castile.

At the beginning of 1296, John of Castile rebelled against Ferdinand IV and took Astudillo, Paredes de Nava and Dueñas, while his son Alfonso of Valencia seized Mansilla. In April 1296 Alfonso de la Cerda invaded the Kingdom of Castile accompanied by Aragonese troops, and went to the city of León, where John of Castile was proclaimed King of León, Seville and Galicia. Immediately afterwards, John of Castile accompanied Alfonso de la Cerda to Sahagún, where he was proclaimed King of Castile, Toledo, Córdoba, Murcia and Jaén. Shortly after being crowned Alfonso de la Cerda and John of Castile, both surrounded the Valladolid municipality of Mayorga, while Henry of Castile parted to the Kingdom of Granada to arrange the peace between the Sultan Muhammed II al-Faqih and Ferdinand IV, since the Granadian troops attacked in those moments in all Andalusia the lands of the King, that were defended, among others, by Alonso Pérez de Guzmán. On 25 August 1296, the Infante Peter of Aragon died victim of the plague while he was under the command of the Aragonese army that surrounded the city of Mayorga, losing with him John of Castile one of his main supporters. Due to the mortality that extended between the besiegers of Mayorga, their commanders were forced to raise the siege.

While John of Castile and Juan Núñez II de Lara waited for the arrival of the King of Portugal with his troops to join them in the siege of the city of Valladolid, where the Dowager Queen María de Molina and Ferdinand IV took refuge, the Aragonese monarch attacked Murcia and Soria, and King Denis of Portugal attacked along the line of Douro river, while Diego López V de Haro sowed disorder in his Lordship of Biscay.

When Henry of Castile, who was conferring with the Sultan of Granada, learned that the Aragonese and the Portuguese had left the Kingdom of Castile, and that the Dowager Queen was besieging Paredes de Nava, he decided to return to Castile, fearing that he would be deprived from his position of guardian of Ferdinand IV. However, under pressure from Alonso Pérez de Guzmán and other knights he attacked the Granadians, who at that time had again attacked the Castilians. Four leagues from Arjona, a battle was fought with the Granadians, in which Henry of Castile would have lost his life if Alonso Pérez de Guzmán had not saved him. For the Castilians the defeat was complete, and their camp was looted. After his return to Castile, Henry of Castile persuaded some knights to leave the siege of Paredes de Nava, despite the opposition of the Dowager Queen, that returned to Valladolid in January 1297 without having taken that.

During the Cortes de Cuellar of 1297, summoned by the Dowager Queen María de Molina, Henry of Castile wanted that the city of Tarifa would be returned to the Sultan of Granada, but he was unable to achieve his objective due to the opposition of María de Molina. In these Cortes Henry of Castile managed to obtain for his nephew Juan Manuel, Prince of Villena the Castle of Alarcón in compensation for having lose the town of Elche after being conquered by the Aragonese, despite the opposition of the Dowager Queen, who didn't want to established such precedents between Castilian nobles and magnates. Shortly before the signing of the Treaty of Alcañices, Juan Núñez II de Lara, who supported Alfonso de la Cerda and John of Castile, was besieged in Ampudia, although he managed to escaped from the siege.

The Treaty of Alcañices (1297)
In 1296 the Dowager Queen María de Molina had threatened the Portuguese monarch with breaking the agreements of the previous year if his attacks on the Castilian territory persisted, before which King Denis of Portugal agreed to return with his troops to his domains.

Through the Treaty of Alcañices were fixed, among other points, the borders between Castile and Portugal, which received a series of fortresses and towns in exchange for breaking their agreements with James II of Aragon, Alfonso de la Cerda, John of Castile and Juan Núñez II de Lara.

At the same time, in the Treaty of Alcañices the projected marriage between Ferdinand IV and the Infanta Constance of Portugal was confirmed as well as the betrothal of Afonso of Portugal, heir to the throne of Portugal, and Infanta Beatrice, sister of Ferdinand IV. On the other hand, the Portuguese monarch brought an army of 300 knights, placed under the orders of João Afonso de Albuquerque, to help María de Molina in her fight against John of Castile who until that moment had received the support of the King Denis of Portugal.

In addition, it was stipulated in the treaty that the towns and localities of Campo Maior, Olivenza, Ouguela and San Felices de los Gallegos would be surrendered to Denis de Portugal as compensation for the loss by Portugal during the reign of Afonso III for a series of towns that were taken from him by Alfonso X of Castile. In addition, the Portuguese king also received the towns of Almeida, Castelo Bom, Castelo Melhor, Castelo Rodrigo, Monforte, Sabugal, Sastres and Vilar Maior. The Castilian and Portuguese monarchs renounced their future mutual territorial claims and the prelates of the two kingdoms agreed on 13 September 1297 to support each other and defend themselves against the possible pretensions of other estates to deprive them of freedoms or privileges. The treaty was ratified not only by the two monarchs of both kingdoms, but also by several representatives of the nobiliary and ecclesiastical arms of both kingdoms, as well as by the Brotherhood of the councils of Castile and by its equivalent of the Kingdom of León. In the long term, the consequences of this treaty were long lasting, since the border between the two kingdoms was hardly modified in the course of the later centuries, becoming one of the longest frontiers of the European continent.

On the other hand, the Treaty of Alcañices contributed to secure the position of Ferdinand IV in the Castilian throne, who was insecure because of internal and external discords, and allowed Dowager Queen María de Molina to extend her freedom of movement in the absence of disputes with the Portuguese sovereign, who had come to support it in her fight against John of Castile, who, at that moment, was still controlling the territory of León.

Last stage of minority (1297–1301)
At the end of 1297, the Dowager Queen sent Alonso Pérez de Guzmán to the Kingdom of León to fight against John of Castile, who continued to control the territory. At the beginning of 1298, Alfonso de la Cerda and John of Castile, supported by Juan Núñez II de Lara, began to mint fake coin, since it contained less metal than it corresponded, with the purpose of destabilizing the economy of the Kingdoms of Castile and León. In 1298, the city of Sigüenza fell to Juan Núñez II de Lara, but it had to be evacuated shortly afterwards by the resistance of the defenders; however soon afterwards he conquered Almazán (who became the stronghold of Alfonso de la Cerda) and Deza, being also returned to Juan Núñez II de Lara the city of Albarracín by King James II of Aragon. In the Cortes de Valladolid in 1298, Henry of Castile again advised the sale of the city of Tarifa to the Muslims, but this was opposed by the Dowager Queen.

The Dowager Queen met in 1298 with the King of Portugal in Toro, and requested that he help her in the fight against John of Castile. However, the Portuguese sovereign refused to attack him and, in common agreement with Henry of Castile, both planned that Ferdinand IV reached a peace agreement with John of Castile, under which the latter kept the Kingdom of Galicia, the city of León, and all the towns that he had conquered only during his lifetime, and at his death, all those territories would pass to Ferdinand IV. Nevertheless, the Dowager Queen, who opposed the project of surrender these territories to John of Castile, bribed Henry of Castile by giving him the cities of Écija, Roa and Medellin so that the project didn't continue, while at the same time she managed to obtain from the representatives of the councils the public rejection of the project for the Portuguese sovereign.

After the meeting with the Portuguese monarch in 1298, the Dowager Queen sent to her son, the 7-years-old Infante Philip of Castile to the Kingdom of Galicia, with the purpose to reinforce the royal authority in that zone, where João Afonso de Albuquerque and Fernando Rodríguez de Castro, Lord of Lemos and Sarria, planted the disorder. In April 1299, after the Cortes de Valladolid of that year, the Dowager Queen recovered the castles of Monzón and Becerril de Campos, which were in the possession of the supporters of Alfonso de la Cerda. In 1299 Juan Alfonso de Haro, Lord of Cameros, captured Juan Núñez II de Lara, partisan of Alfonso de la Cerda. Meanwhile, the Dowager Queen send troops to rescue Lorca, besieged by the King of Aragon, while in August of the same year, the troops of the Castilian king surrounded Palenzuela. Juan Núñez II de Lara was released in 1299 on condition that his sister Juana Núñez de Lara married Henry of Castile, to pay tribute to Ferdinand IV and swear not to revolt against him, and return to the Crown the cities of Osma, Palenzuela, Amaya, Dueñas (which was granted to Henry of Castile), Ampudia, Tordehumos (which was given to Diego López V de Haro), La Mota, and Lerma.

In March 1300, the Dowager Queen met again with King Denis of Portugal in Ciudad Rodrigo, where the Portuguese sovereign requested funds to pay the cost of the matrimonial dispensations that the Pope should grant, so that the marriages between Fernando IV and Constance of Portugal, and Beatrice of Castile with Afonso of Portugal could be carried out. In the Cortes de Valladolid in 1300 the Dowager Queen imposed her will and managed to obtain the necessary amount of money which could persuade Pope Boniface VIII to grant the dispensation that legitimized the marriage of the late Sancho IV of Castile with María de Molina.

During the Cortes of Valladolid of 1300 John of Castile renounced to his pretensions to the throne, notwithstanding to have been proclaimed King of León in 1296, and made public his oath of fidelity to Fernando IV and his successors on 26 June 1300. In return for his resignation to the possession of the Lordship of Biscay, whose possession was confirmed to Diego López V de Haro, John of Castile and his wife María I Díaz de Haro (niece of Diego López V de Haro and legitimate heiress of Biscay) received the cities of Mansilla, Paredes de Nava, Medina de Rioseco, Castronuño and Cabreros. Shortly after, the Dowager and Henry and John of Castile, accompanied by Diego López V de Haro, besieged the town of Almazán, but they left the siege due to the opposition of Henry of Castile.

In 1301 King James II of Aragon besieged the town of Lorca, who belonged to Juan Manuel, Prince of Villena, who surrender it to the Aragonese monarch, and at the same time the Dowager Queen, with the purpose of amortizing the disbursement made to provide an army with which to release the city of the Aragonese siege, ordered the siege of the castles of Alcalá and Mula, and immediately after besieged the city of Murcia, where James II was; the Aragonese monarch was close to be by the Castilian troops, but he was warned by Henry and John of Castile, who were afraid of a complete defeat of James II, because both wanted to maintain good relations with him.

In the Cortes de Burgos of 1301 were approved the subsidies demanded by the Crown to finance the war against the Kingdoms of Aragon and Granada and against Alfonso de la Cerda, while were granted subsidies to obtain the legitimation of marriage of the Dowager Queen with Sancho IV; for this purpose, were sent 10,000 silver marks to the Pope, despite the famine that ravaged the Kingdoms of Castile and León.

In June 1301, during the Cortes de Zamora, John of Castile and the ricoshombres of Léon, Galicia and Asturias, supporters mostly of the John, approved the subsidies demanded by the Crown.

Personal rule (1301–1312)
In November 1301, when the court was in the city of Burgos, was made public the bull by which Pope Boniface VIII legitimized the marriage of María de Molina with the late King Sancho IV, and therefore her children were legitimate from that moment. At the same time, Ferdinand IV attained his legal majority, who was officially declared on 6 December 1301. With this, John of Castile and the Infantes de la Cerda lost one of their main arguments when reclaiming the throne, not being able to use the illegitimacy of the Castilian monarch. In addition was also received the papal dispensation for the marriage of Fernando IV with Constance of Portugal.

Henry of Castile, annoyed by the legitimation of Ferdinand IV by Pope Boniface VIII, allied himself with Juan Núñez II de Lara, in order to indispose and antagonize Ferdinand IV with his mother the Dowager Queen. Both were joined by John of Castile, who continued to claim the Lordship of Biscay on behalf of his wife, María I Díaz de Haro.

In 1301, while the Dowager Queen was in Vitoria with Henry of Castile answering the complaints presented by the Kingdom of Navarre in relation to the Castilian attacks to their lands, John of Castile and Juan Núñez II de Lara indisposed the King with his mother and sought his amusement in the lands of León by means of hunting, to which Ferdinand IV showed his predilection since childhood. With the Dowager Queen in Vitoria, the Aragonese nobles revolted against their monarch offered their support to obtain from James II the return to Castile of the towns from which he had taken over in the Kingdom of Murcia. That same year Henry of Castile, allied with Diego López V de Haro, demanded to Ferdinand IV, in compensation to leave his position of royal guardian (and after having previously blackmailed the Dowager Queen with declaring the war to his son if they didn't accede to his request), the possession of the towns of Atienza and San Esteban de Gormaz, which were granted by the King.

On 23 January 1302 Ferdinand IV married in Valladolid with Constance, daughter of King Denis of Portugal. In the Cortes de Medina del Campo of May 1302, Henry and John of Castile and Juan Núñez II de Lara tried to indispose the King with his mother, accusing her of having given away the jewels given to her by Sancho IV, and later, when the accusation was proved to be false, they accused her of having appropriated the subsidies granted to the Crown in the Cortes of previous years, an accusation that was also proved false when Nuño, Abbot of Santander and Chancellor of the Dowager Queen, reviewed and made public the accounts of María de Molina, who not only had not appropriated the Crown's funds but contributed with her own income to the support of the monarchy. While celebrating the Cortes of Medina del Campo in 1302, which was attended by a representation of the King of Castile, Sultan Muhammed II al-Faqih of Granada died and was succeeded by his son, Muhammad III, who attacked the Kingdoms of Castilla y León and conquered the municipality of Bedmar.

In July 1302 Ferdinand IV went to the Cortes de Burgos along with his mother, with whom he had restored good relations, and with Henry of Castile. The King, although under the influence of his private Samuel de Belorado, of Jewish origin —who tried to indispose the King from his mother— had decided to dispense from the presence of the John of Castile and Juan Núñez II de Lara in the Cortes. At the end of the Cortes, Ferdinand IV went to the city of Palencia, where was celebrated the marriage of Alfonso of Valencia (son of John of Castile) with Teresa Núñez de Lara (sister of Juan Núñez II de Lara).

At that time was accentuated the rivalry existed between Henry of Castile, María de Molina and Diego López V de Haro on one side, and John of Castile and Juan Núñez II de Lara on the other side. Henry of Castile threatened the Dowager Queen with declaring the war to Ferdinand IV and herself if his demands were accepted, while the magnates sought to eliminate the influence that María de Molina exerted on her son, of whom the people began to distrust, because of the influence of the ricoshombres had over him. In the final months of 1302, the Dowager Queen, who was in Valladolid, was forced to appease the ricoshombres and members of the nobility, who planned to rise up in arms against Ferdinand IV, who spent the Christmas of 1302 in lands of the Kingdom of León, accompanied by the John of Castile and Juan Núñez II de Lara.

At the beginning of 1303 there was a planned meeting between King Denis of Portugal and Ferdinand IV, where the Castilian monarch hoped that his cousin and father-in-law the Portuguese monarch would return to him some territory. For his part, Henry of Castile, Diego López V de Haro and the Dowager Queen presented their excuses for not attending the meeting. María de Molina's purpose in refusing to attend was to watch over Henry of Castile and the Lord of Biscay, whose relations with Ferdinand IV were strained because of the friendship showed by the monarch to John of Castile and Juan Núñez II de Lara. In May 1303 the meeting between Denis of Portugal and Ferdinand IV took place in the city of Badajoz. The infant John of Castile and Juan Núñez II de Lara predisposed Fernando IV against Henry of Castile and Diego López V de Haro, while the concessions offered by the Portuguese sovereign, who offered to help him if necessary against Henry of Castile, disappointed Ferdinand IV.

Meeting of Ariza and death of Henry of Castile (1303)
In 1303, while the King was in Badajoz, Henry of Castile, Diego López V de Haro and Juan Manuel, Prince of Villena had a meeting in Roa, and they agreed that Juan Manuel would have a meeting with the King of Aragon, who agreed that the three magnates and himself should meet the Day of John the Baptist in the municipality of Ariza. Later, Henry of Castile communicated his plans to María de Molina, who was in Valladolid, with the purpose of that she was united to them. The plan of Henry of Castile consisted in that Alfonso de la Cerda became King of León and married with the Infanta Isabel (sister of Ferdinand IV and repudiated child-bride of the Aragonese monarch), while the Infante Peter of Castile (brother of Fernando IV) would be proclaimed King of Castile and would marry with a daughter of James II of Aragon. Henry of Castile stated that his intention was to achieve peace in the Kingdom and to eliminate the influence of the John of Castile and Juan Núñez II de Lara.

This plan, which would have meant the disintegration of the Kingdom of Castile and León, as well as the forced resignation of Ferdinand IV to the throne, was rejected by the Dowager Queen, who refused to support the project and to participate in the Meeting of Ariza. In the meanwhile, Ferdinand IV begged his mother to put peace between him and the magnates who supported Henry of Castile, who again begged the Dowager Queen to support the Henry's plan, to which she refused. While still celebrating the Meeting of Ariza, the Dowager Queen reminded Henry of Castile and his companions of the loyalty they owed to her son, as well as the properties with which she had endowed them, thereby enabling some knights to leave Ariza without seconding Henry's plan. However, Henry of Castile, Juan Manuel of Villena and other knights were committed to make the war to Ferdinand IV, as well as to that the Kingdom of Murcia should be returned to Aragon and the Kingdom of Jaén given to Alfonso de la Cerda. However, while the Dowager Queen met the Councils and obstructed the intentions of Henry of Castile, he became seriously ill and had to be transferred to his village of Roa. Faced with Henry's illness, the Dowager Queen, fearing that his lordships and castles would be inherited by Juan Manuel of Villena and Lope Díaz de Haro (to those he planned to bequeath his possessions to his death), she persuaded Henry's confessor, as well as his companions, to convince him to return his properties to the Crown, to which Henry refused, since he didn't wish that his inheritance could be taken by Ferdinand IV. When Juan Manuel of Villena, nephew of Henry of Castile, arrived at Roa, he found him speechless, and taking him for dead, he took possession of all the valuable objects that were there, as referred to in the Chronicle of Ferdinand IV:

"And when he saw Prince Henry speechless, and believing him dead, took everything he found in the house, silver and beasts and letters with the royal seal, and leave the village and took with him everything he found from Prince Henry, and goes to Peñafiel, who belonged to Prince Juan Manuel."

The Dowager Queen then sent orders to all the fortresses of the dying Henry, in which it was arranged that if he died, they would not surrender the castles but to the King's troops, to which they belonged. Henry of Castile died on 8 August 1303 and was buried in the disappeared Monastery of San Francisco of Valladolid. His vassals gave little evidence of mourning for him, and when the Dowager Queen learned of it, she ordered that a brocade cloth be placed on the coffin, and that all the clerics and nobles present in Valladolid should attend the funerals.

While Henry of Castile was agonizing, Ferdinand IV made a pact with Sultan Muhammed III of Granada, which stipulated that the sovereign of Granada would keep Alcaudete, Quesada and Bedmar, while Ferdinand IV would keep the city of Tarifa. Muhammed III declared himself vassal of Ferdinand IV and promised to pay him the corresponding parias. On learning that Henry of Castile had died, Ferdinand IV was pleased and granted most of his land to Juan Núñez II de Lara, who also received the position of Adelantado mayor of the Andalusian border, while returning Écija to María de Molina, for having been hers before she gave it to Henry of Castile. In November 1303 the King was in Valladolid with his mother, and requested her advice, since he wished to put an end to the dispute between John of Castile and Diego López V de Haro for the possession of the Lordship of Biscay. The Dowager Queen told him that she would help him to resolve the matter, while the King made important donations to her, for the good relations between Ferdinand IV and his mother had been fully restored.

In January 1304, when the King was in Carrión de los Condes, John of Castile claimed again, in the name of his wife, and supported by Juan Núñez II de Lara, the Lordship of Biscay, although the monarch at first resolved that John of Castile's wife be satisfied with receiving Paredes de Nava and Villalón de Campos as compensation, to which John of Castile refused, arguing that his wife would not accept this for disagreeing with the previous pacts established by her husband in relation to The Lordship of Biscay. In view of the situation, the King proposed that Diego López V de Haro surrender to María I Díaz de Haro, in exchange for the Lordship of Biscay, the cities of Tordehumos, Íscar, Santa Olalla, as well as his possessions in Cuéllar, Córdoba, Murcia, Valdetorio, and the Lordship of Valdecorneja. For his part, Diego López V de Haro would retain the Lordship of Biscay, Orduña, Valmaseda, Las Encartaciones, and Durango. John of Castile accepted the offer of the King, who called Diego López V de Haro to Carrión de los Condes. Nevertheless, the Lord of Biscay didn't accept the proposal of the sovereign and threatened him with the rebellion before leaving. The King then made his mother reconcile with Juan Núñez II de Lara, while were initiated the maneuvers for the Treaty of Torrellas, signed in 1304, in which Diego López V de Haro didn't take part because he was distanced from Ferdinand IV, who promised to John of Castile to give him the Lordship of Biscay, and to Juan Núñez II de Lara La Bureba and the possessions of Diego López V de Haro in La Rioja, if both resolved the diplomatic negotiations with Aragon following the desire of the monarch.

In April 1304, John of Castile began negotiations with the Kingdom of Aragon, pledging Fernando IV to accept the decisions to be made by the mediators of the Kingdoms of Portugal and Aragon, who would meet in the following months, regarding the demands of Alfonso de la Cerda and respect to his disputes with the King of Aragon. At the same time, the King confiscated the lands of Diego López V de Haro and Juan Alfonso de Haro, Lord of Cameros, and divided them among the ricoshombres. In spite of this, both magnates didn't rebel against the King.

In the meanwhile, in Galicia, the Infante Philip of Castile, brother of Fernando IV, defeated in a battle his brother-in-law Fernando Rodríguez de Castro (husband of Violante Sánchez, illegitimate daughter of Sancho IV of Castile) who lost his life in that battle.

Treaty of Torrellas (1304)
One of the most important events of the reign of Ferdinand IV once reached his majority, was the agreement of borders established with James II of Aragon in 1304, and known in history as the Treaty of Torrellas —called a sentencia arbitral, "sentence by arbitration," in Castilian—. With the agreement also tried to put an end to the claims of Alfonso de la Cerda, pretender to the Castilian-Leonese throne. On 8 August 1304, in the town of Torrellas, King Denis of Portugal, the Archbishop of Zaragoza, Jimeno de Luna (who represented the Kingdom of Aragon) and John of Castile (who represented the Kingdom of Castile), made public the clauses of the Treaty of Torrellas. The purpose of the negotiation was to put an end to the existing disputes between the Kingdoms of Castile and Aragon with respect to the possession of the Kingdom of Murcia. Sultan Muhammed III of Granada participated in the conversations at the request of Ferdinand IV, who ordered that the Granadian ruler intervene in the Treaty and alliance between the Christian Kingdoms of the peninsula, since he had an interest in preserving the friendship, submission and parias which every year Granada was obliged to pay to the King of Castile, and which constituted a precious resource. Therefore, James II of Aragon and the Denis of Portugal both agreed to maintain good relations with the Sultan of Granada.

According to the terms of the Treaty, the Kingdom of Murcia, then in the hands of James II of Aragon, would be divided between the Kingdoms of Aragon and Castile, and along the Segura river would be established the southern border of Aragon. The cities of Alicante, Elche, Orihuela, Novelda, Elda, Abanilla, Petrel, Crevillente and Sax, would continue in the hands of the Aragonese monarch. In the Treaty was also recognized the possession by the Kingdom of Castile of the cities of Murcia, Monteagudo, Alhama, Lorca and Molina de Segura. Citizens affected by the change of sovereignty would be free to stay in their cities and towns if they wished, or they could freely leave the territory. At the same time, both Kingdoms agreed to grant freedom to prisoners of war, as well as to be enemies of their common rivals, excepting the Holy See and the Kingdom of France. The Seigneury of Villena continued in the hands of Prince Juan Manuel, but the lands in which it was settled would remain under Aragonese sovereignty.

On 8 August 1304, the Kings of Portugal and Aragon pronounced, in the presence of John of Castile, about the claims of the Infantes de la Cerda. Alfonso de la Cerda, supported by James II of Aragon, was granted as compensation for his resignation to the throne of Castile several lordships and possessions (although dispersed throughout the Castilian-Leonese territory in order to avoid the formation of a microstate), who included Alba de Tormes, Valdecorneja, Gibraleón, Béjar and Real de Manzanares, in addition to the castle of Monzón de Campos, Gatón de Campos, La Algaba, and Lemos. In addition, Alfonso de la Cerda received numerous rents and possessions in Medina del Campo, Córdoba, Toledo, Bonilla and Madrid. Ferdinand IV, who wished that his cousin Alfonso de la Cerda enjoyed an annual income of 400,000 maravedíes, ordered that if the income of the possessions that had been granted to him didn't reach that amount he would give him other territories until the incomes reached the expected amount. At the same time it was arranged that, as a proof that the Castilian monarch would gave these lands to Alfonso de la Cerda, the castles of Alfaro, Cervera, Curiel de los Ajos and Gumiel would be granted to four ricoshombres for thirty years.

For his part, Alfonso de la Cerda renounced his rights to the Castilian-Leonese throne, to use the royal titles, and to use the royal seal. At the same time, he promise to return to the King the cities of Almazan, Soria, Deza, Serón, Alcalá, and Almenara. However, he soon used the royal symbols again, contrary to what was agreed in Torrellas. The question of the rights to the throne of Alfonso de la Cerda was finally settled during the reign of the son and successor of Ferdinand IV, Alfonso XI, when in 1331 at Burguillos, Alfonso de la Cerda finally paid homage to the King of Castile and León.

Ferdinand IV promised that the clauses of the Treaty of Torrellas should be sworn in and honored by the ricoshombres, magnates, the Masters of the Military Orders of Santiago, Calatrava, Templars and Hospitallers, and by the councils of his Kingdoms. In the winter of 1305, during the visit of Ferdinand IV in the city of Guadalajara, the monarch received the homage of his cousin Ferdinand de la Cerda, who acted on behalf of his older brother, Alfonso de la Cerda, who stated through his brother that he had received the castles and lordships that were awarded to him in the Treaty of Torrellas, and paid homage to Ferdinand IV for the first time.

In January 1305, Ferdinand IV —still in Guadalajara but with the Dowager Queen, John of Castile, Juan Manuel of Villena, Juan Núñez II de Lara, Diego López V de Haro and Juan Alfonso de Haro—, requested again to Diego López V de Haro the return of the Lordship of Biscay to his niece María I Díaz de Haro, but he refused.

Treaty of Elche (1305)
In order to solve the inconveniences derived from the distribution of the Murcia territory, and to other minor questions, was agreed a meeting between Ferdinand IV and James II of Aragon in the Monastery of Santa María de Huerta, located in the Province of Soria. This meeting took place on 26 February 1305, and was attended by the Kings of Castile and Aragon, John of Castile, Juan Núñez II de Lara, Juan Manuel of Villena, Violante Manuel and her husband the Infante Afonso of Portugal, the Archbishop of Toledo and the Bishops of Sigüenza and Oporto, among others. In exchange for her renunciation of the Lordships of Elda and Novelda, which would become part of the Kingdom of Aragon, Violante Manuel (sister of Juan Manuel), received the Lordships of Arroyo del Puerco and Medellín from Ferdinand IV, who at the same time gave to Juan Manuel the Lordship and Castle of Alarcón as compensation for his resignation to the possession of Elche. Juan Manuel took possession of the town of Alarcón on 25 March 1305.

On the other hand, James II of Aragon, in spite of the insistence of Ferdinand IV, refused to hand over the Lordship of Albarracín to Juan Núñez II de Lara, who blamed his hitherto ally John of Castile for the low influence exerted on his behalf, and in consequence began to distance from him. On the other hand, Fernando IV and James II granted powers to Diego García de Toledo, Chancellor of the seal of the Puridad, and to Gonzalo García, advisor of the Aragonese monarch, respectively, so that both personages concluded the distribution of Kingdom of Murcia between both Kingdoms, following the terms of the Treaty of Torrellas.

Finally, the delegates of both monarchs reached an agreement that was expressed in the Treaty of Elche, signed on 19 May 1305, and which definitively established the border of the Kingdom of Murcia, which had been divided between Castile and Aragon. The dividing line between the two Kingdoms was established between Pechín and Almansa (who belonged to Ferdinand IV) and Caudete (who passed to James II). The dividing line established between the two kingdoms in the territory of Murcia would follow the course of the Segura river from Cieza, corresponding to Castile the possession of Murcia, Molina de Segura and Blanca, as well as the city of Cartagena, which James II resigned because was located in the inner south of the Segura river, and that belong definitively to the Kingdom of Castile and León. Nevertheless, the transfer of the city of Cartagena to Castile was made on condition that Ferdinand IV respected the property of Juan Manuel of Villena on the Lordship de Alarcón, to which the Castilian monarch didn't oppose. At the same time, in the Treaty of Elche was arranged that the municipality of Yecla would continue in the possession of Juan Manuel, and his jurisdiction would correspond to Castile.

The partition of the Kingdom of Murcia, which didn't take into account the historical ties of the region, meant that the northern part would correspond to the Kingdom of Aragon, which sought to assimilate it immediately to the rest of his dominions, while the southern part, including Cartagena and the city of Murcia, passed definitely to Castilian hands.

Conflicts over the possession of the Lordship of Biscay (1305–1307)
In 1305 Diego López V de Haro was called to appear in the Cortes of Medina del Campo, although he didn't come but after being summoned several times, to respond to the demands of his niece María I Díaz de Haro, who claimed, using the influence of her husband John of Castile, the possession of the Lordship of Biscay.

In the absence of the Lord of Biscay, John of Castile filed a lawsuit against him before Ferdinand IV, and alleged that he can prove that the Lordship of Biscay was illegally occupied by Sancho IV of Castile, which is why it was now in the hands of Diego López V de Haro, uncle of his wife. However, while John of Castile presented the evidence to the King's representatives, Diego López V de Haro arrived, accompanied by 300 knights. The Lord of Biscay refused to renounce to his domains, arguing that John of Castile and his wife had renounced to their rights in a solemn oath in 1300.

Failing to reach an agreement, due to the arguments presented by both parties, Diego López V de Haro returned to Biscay, although the Cortes de Medina del Campo had not yet finished until mid-June 1305. In mid-1305, the court was in the city of Burgos, and while Diego López V de Haro proposed to appeal to the Pope, due to the solemn oath of resignation to the Lordship of Biscay made John of Castile and his wife in 1300, Ferdinand IV offered to María I Díaz de Haro the possession of several cities of the Lordship of Biscay, among them San Sebastián, Salvatierra, Fuenterrabia and Guipúzcoa, but she refused, advised by Juan Núñez II de Lara (who was distanced from with her husband) and despite the pressures of John of Castile. Shortly thereafter, John of Castile and Diego López V de Haro signed a truce, valid for two years, during which the King was confident that the Lord of Biscay would break his alliance with Juan Núñez II de Lara. Later, during Christmas of 1305, Ferdinand IV met with Diego López V de Haro in Valladolid, but the Lord of Biscay was accompanied by Juan Núñez II de Lara, who was forced by the King (because he was estranged from him) to leave the city, because he wished to break the alliance between him and Diego López V de Haro, although the monarch did not succeed, since the Lord of Biscay was convinced that John of Castile would not cease in his claims.

At the beginning of 1306, Lope Díaz de Haro, son and heir of Diego López V de Haro, was also estranged from Juan Núñez II de Lara and tried to persuade his father to accept the solution proposed by Ferdinand IV. That same year, the King gave the position of First Majordomo to Lope Díaz de Haro; shortly after, the Lord of Biscay had a meeting with the King, but again caused his anger because arrived accompanied by Juan Núñez II de Lara. During the meeting, Diego López V de Haro tried to reconcile Juan Núñez II de Lara with the sovereign, while the latter tried that the Lord of Biscay broke his relations with his ally. Persuaded by Juan Núñez II de Lara, Diego López V de Haro left without the King's consent, while ambassadors arrived from the Kingdom of France, requesting an alliance between both countries, and also asking the hand of Infanta Isabella of Castile, sister of Fernando IV.

In April 1306, John of Castile, despite the opposition of the Dowager Queen, induced Ferdinand IV to declare war to Juan Núñez II de Lara, knowing that Diego López V de Haro would defend him, and advised the monarch besiege Aranda de Duero, where Juan Núñez II de Lara was, who, in view of the situation, broke his oath of vassalage to the King. After a camp battle, Juan Núñez II de Lara managed to escape from the siege to which Aranda de Duero was intended to be subjected, and met Diego López V de Haro and his son, and agreed to declare the war on Ferdinand IV separately in their respective domains. The royal troops demanded concessions from Ferdinand IV, who had to grant them even though they were not diligent in making war, and so the King ordered John of Castile to enter into negotiations with Diego López V de Haro and his supporters, to which he agreed, because his vassals didn't supported the war. Negotiations didn't begin, and the war continued, although John of Castile advised the monarch to sign the peace if this was viable. Ferdinand IV asked the intervention of his mother, who, after negotiations with the rebels through Alonso Pérez de Guzmán, succeeded in arrange a meeting with them in Pancorbo. In the meeting was agreed that the three rebellious magnates granted castles as hostages to the King, who in exchange from their homage as vassals, promised to respect their properties and pay their troops; however, the agreement didn't satisfy John of Castile, who renewed his claim over the Lordship of Biscay in the name of his wife, while Ferdinand IV, with the purpose of pleasing John of Castile, took the merindad of Galicia from his brother the Infante Philip of Castile, and granted to Diego García de Toledo, private of John of Castile.

Ferdinand IV, still anxious to please John of Castile, sent Alonso Pérez de Guzmán and Juan Núñez II de Lara to talk with Diego López V de Haro, who refused to cede the Lordship of Biscay to John of Castile and his wife, María I Díaz de Haro. When John of Castile learned of this, he summoned Juan Manuel of Villena and his vassals to support him in his pretensions, while the King and his mother talk with Juan Núñez II de Lara to persuade Diego López V de Haro to return the Lordship of Biscay. In September 1306 the King had a meeting with Diego López V de Haro in Burgos. Ferdinand IV proposed that Diego López V de Haro could retain the Lordship of Biscay during his lifetime, but after his death the succession should pass to María I Díaz de Haro, with the exception of the cities of Orduña and Valmaseda, which should be granted to Lope Díaz de Haro, son of Diego López V de Haro. However, the proposal wasn't accepted by Diego López V de Haro, and in view of his obstinacy, the monarch again tried to end his alliance with Juan Núñez II de Lara. Shortly afterwards, the Lord of Biscay again appealed to the Pope.

At the beginning of 1307, while the King, his mother, and John of Castile were going to Valladolid, they learned that Pope Clement V recognized the validity of the oath taken by John of Castile and his wife in 1300 about their resignation over the Lordship of Biscay; in consequence, John of Castile was forced to accept it or respond to the lawsuit brought against him by Diego López V de Haro. In February 1307, another attempt was made to resolve the dispute over the Lordship of Biscay, who repeat the terms of the meeting of Burgos in September 1306, but with the addition that, besides Orduña and Valmaseda, Lope Díaz de Haro would also receive the cities Miranda and Villalba de Losa from the King. However, again the agreement wasn't accepted by the Lord of Biscay. Soon after, the Cortes were summoned in the city of Valladolid.

In the Cortes de Valladolid in 1307, when María de Molina saw that the ricoshombres, led by John of Castile, protested against the measures taken by the King's privates, she tried, in order to please John of Castile, to put a definitive end over the possession of the Lordship of Biscay. For this, the Dowager Queen counted on the collaboration of her half-sister Juana Alfonso de Molina, who persuaded her daughter María I Díaz de Haro to accept the agreement proposed by the King in February 1307. Diego López V de Haro and his son Lope Díaz de Haro agreed to sign the agreement, who followed the terms of the previous meetings of September 1306 and February 1307: María I Díaz de Haro should succeed her uncle after his death and Lope Díaz de Haro received the cities of Orduña, Valmaseda, Miranda and Villalba de Losa.

Once the agreement about the possession of the Lordship of Biscay became known, Juan Núñez II de Lara felt despised by both the King and his mother, and he suddenly left the Cortes before they had finalized. For this reason, Ferdinand IV granted the position of First Majordomo to Diego López V de Haro, which caused that John of Castile left the court, warning the King that he wouldn't count with his help until the governors of the castles of Diego López V de Haro paid homage to his wife María I Díaz de Haro. However, shortly afterwards they met in Lerma, where are already stay María I Díaz de Haro, John of Castile, Juan Núñez II de Lara, Diego López V de Haro, and Lope Díaz de Haro, and was agreed that the Biscay nobility would pay homage to María I Díaz de Haro as heiress and future Lady of Biscay, and the same oath was done in the cities and castle that would receive Lope Díaz de Haro.

Internal conflicts in Castile and meeting of Grijota (1307–1308)
In 1307, on the advice of the now reconciled John of Castile and Diego López V de Haro, the King ordered Juan Núñez II de Lara to leave the Kingdom of Castile and to return the castles of Moya and Cañete, located in the Province of Cuenca, and that Ferdinand IV had granted him previously. The King went to Palencia, where his mother was, who advised him that, since he had expelled Juan Núñez II de Lara from the Kingdom, if he wished to preserve the respect of the ricoshombres and the nobility, he should be inflexible. Ferdinand IV then went to Tordehumos, where the rebellious magnate was, and surrounded the town at the end of October 1307, being accompanied by numerous ricoshombres and the Master of the Order of Santiago with their troops. Shortly after they were joined by the John of Castile (recently recovered from an illness) and his son, Alfonso de Valencia, with their troops. During the siege of Tordehumos, Ferdinand IV received the order of Pope Clement V to seize the castles and possessions of the Knights Templar, and to keep them in his possession until the pontiff arranged what was to be done with them. At the same time, John of Castile presented to the King a proposal of peace, coming from the besieged ones in Tordehumos, that Ferdinand IV didn't accept. During the siege, the King, having difficulty in paying his troops, sent his wife Queen Constance and their newborn daughter, Infanta Eleanor of Castile to request a loan in his name to King Denis of Portugal, his father-in-law. At the same time, John of Castile, resentful, advised the monarch to abandon the siege and that he would either finish it or take Íscar, or else he would attend the meeting that Ferdinand IV was to keep with the King of Aragon in Tarazona in his place. However, the King, suspicious of John of Castile, disavowed his proposals and sought to satisfy him by other means.

Because of the desertions of some ricoshombres, including Alfonso de Valencia, Rodrigo Álvarez de las Asturias and García Fernández de Villamayor, and also because of the illness of the Dowager Queen, who couldn't advise him, Ferdinand IV decided to negotiate with Juan Núñez II de Lara the surrender of the latter. After the capitulation of the town of Tordehumos at the beginning of 1308, Juan Núñez II de Lara promised to surrender all his lands to the King, except those he had in La Bureba and La Rioja, for having them Diego López V de Haro, while paid homage to Ferdinand IV, who signed this agreement without the knowledge of his mother, seriously ill in those moments.

After the siege of Tordehumos, numerous magnates and knights tried to indispose the King with Juan Núñez II de Lara and with John of Castile, telling each of them separately that Ferdinand IV desired the death of both; for this, both allied themselves, fearing that the King desired their deaths, although without the support of Diego López V de Haro. Nevertheless, they were persuaded by María de Molina that Ferdinand IV didn't wish them any bad, something that later was confirmed to them by the own sovereign. However, John of Castile and his companions requested to present their petitions to the Dowager Queen and not to him, to which the sovereign acceded. The claims (presented by the plaintiffs in the called Meeting of Grijota) were that the sovereign granted the merindad of Galicia to Rodrigo Álvarez de las Asturias and the merindad of Castile to Fernán Ruiz de Saldaña and the expel from the court of his privates Sancho Sánchez de Velasco, Diego García and Fernán Gómez de Toledo. The demands presented by the magnates were accepted by the monarch.

In 1308, Rodrigo Yáñez, Master of the Knights Templar in the Kingdom of Castile, surrender to María de Molina the fortresses of the Order in the Kingdom, but the Dowager Queen didn't agree to take them without the consent of her son, which the latter granted. However, the Master didn't deliver the castles to the Dowager Queen, but offered them to the Infante Philip of Castile, brother of Ferdinand IV, to give them to him, with the condition that he asked the King in his name that he could attend the demands of the Templars to the prelates of his Kingdom.

In the Cortes de Burgos in 1308 were also present, besides the King, the Dowager Queen, John of Castile, the Infante Peter of Castile, Juan Manuel of Villena and most of the ricoshombres and magnates. Ferdinand IV tried to put order in the affairs of his domains, as well as to reach a budgetary balance and to reorganize the administration of the Court, while trying to reduce the attributions of John of Castile, aspect this last who proved to be impossible for the monarch.

John of Castile filed suit with Infante Philip of Castile for the possession of the Templar castles of Ponferrada, Alcañices, San Pedro de Latarce and Haro, of which he had appropriated, and which he was forced to hand over to the King, while the Master of the Knights Templar was committed to deliver to Ferdinand IV the castles that still had in his power.

Treaty of Alcalá de Henares (1308)
In March 1306 Ferdinand IV had requested to meet with James II of Aragon, and from that moment the ambassadors of the Kingdoms of Castile and Aragon tried to set a date for the meeting between the two sovereigns, that had to be postponed several times due to the existing internal conflicts in both Kingdoms. The clauses of the Treaty of Alcalá de Henares, signed on 19 December 1308, had their origins in the meetings held by the Kings of Castile and Aragon in the Monastery of Santa María de Huerta and in Monreal de Ariza in December 1308. The themes discussed in the meetings were the relaunch of the Reconquista wars, desired by both sovereigns, and the marriage of the Infanta Eleanor of Castile, eldest daughter and heiress of Ferdinand IV, with the Infante James of Aragon, eldest son and heir of James II and, finally, the satisfaction of the commitments made with Alfonso de la Cerda, which had not yet been fully fulfilled.

Regarding the marriage between Eleanor of Castile and James of Aragon, although it was celebrated in October 1319 was never consummated, since the Infante James escaped after the wedding ceremony, resigned soon after to his rights to the Aragonese throne, and entered in the Knights Hospitaller Order. The Infanta Eleanor, years later (1329), marry with Alfonso IV of Aragon, second son and successor of James II. Regarding the second subject discussed in the meetings of the sovereigns, Ferdinand IV gave to Alfonso de la Cerda 220,000 maravedíes that had not yet been received by him and in exchange he surrender to the king the cities of Deza, Serón and Alcalá. The idea of re-launching the struggle against the Kingdom of Granada was enthusiastically received by both sovereigns, who had the support of King Abu al-Rabi Sulayman of Morocco, who was at war against Sultan Muhammed III of Granada.

After the meetings held between the two sovereigns, Ferdinand IV met in the town of Almazán with his mother and both agreed to clean up the area between Almazán and Atienza from criminals and destroy the fortresses that served them as a refuge, work which was made by Infante Philip of Castile, brother of Ferdinand IV. For her part, the Dowager Queen was pleased with the agreements between her son and the King of Aragon. Immediately after, the King went to Alcalá de Henares.

On 19 December 1308, in Alcala de Henares, Ferdinand IV and the Aragonese ambassadors Bernaldo de Sarriá and Gonzalo García signed the Treaty of Alcalá de Henares. The Castilian sovereign, who had the support of his brother, the Infante Peter, Diego López V de Haro, the Archbishop of Toledo and the Bishop of Zamora, agreed to start the war against the Kingdom of Granada on 24 June 1309 and promised, like the Aragonese monarch, not to sign a separate peace with the Granadine ruler. Ferdinand IV and James II both agree to contribute with ten galleys each for the expedition. It was approved with the consent of both parties that the troops of the Kingdom of Castile and León would attack the cities of Algeciras and Gibraltar, while the troops of the Kingdom of Aragon would conquer the city of Almería.

Ferdinand IV promised to give up one-sixth of the Kingdom of Granada to the Aragonese king, and granted him the Kingdom of Almería in its entirety as advance, except for the cities of Bedmar, Locubin, Alcaudete, Quesada, and Arenas, who previously belonged to the Kingdom of Castile and León. Ferdinand IV established that if the situation occurred that the Kingdom of Almería didn't correspond to the sixth part of the Kingdom of Granada, the Archbishop of Toledo (on the part of Castile) and the Bishop of Valencia (on the part of the Aragon) would be the ones in charge to solve the possible deficiencies of the calculation. The granting to the kingdom of Aragon of such a large part of the Kingdom of Granada caused that John of Castile and Juan Manuel of Villena protested against the ratification of the Treaty, although their protests had no consequences.

The entry into force of the clauses of the Alcalá de Henares treaty meant a significant expansion of the future boundaries of the Kingdom of Aragon, which reached a higher limit than those foreseen in the Treaties of Cazola and Almizra, in which future areas of expansion of the Kingdoms of Castile and Aragon would be previously established. In addition, Ferdinand IV gave his consent for James II of Aragon to negotiate an alliance with the King of Morocco, in order to combat the Kingdom of Granada.

After the signing of the Treaty of Alcalá de Henares, the Kings of Castile and Aragon sent ambassadors to the Court of Avignon, in order to request Pope Clement V to grant the condition of Crusade to the fight against the Muslims in the south of the Iberian Peninsula, and to grant the necessary dispensation for the marriage between Eleanor of Castile and James of Aragon, to which the Pope acceded, because such necessary dispensation was granted before the arrival of the ambassadors to Avignon. On 24 April 1309, Pope Clement V, through the bull "Indesinentis cure", authorized the preaching of the Crusade in the dominions of King James II of Aragon, and granted to this fight the tithes that had been destined for conquest of Corsica and Sardinia.

In the Cortes of Madrid in 1309 —the first celebrated in the present capital of Spain—, the king manifested his desire to go to war against the Kingdom of Granada, while demanding subsidies to this enterprise. In these Cortes were present King Ferdinand IV and his wife Queen Constance, Dowager Queen María de Molina, Infantes Peter and Philip, John of Castile, Juan Manuel of Villena, Juan Núñez II de Lara, Diego López V de Haro, Alfonso Téllez de Molina (maternal uncle of the King), the Archbishop of Toledo, the Masters of the Military Orders of Santiago and Calatrava, representatives of cities and councils, and other nobles and prelates. The Cortes approved the concession of five services, destined to pay the soldiers of the ricoshombres and hidalgos.

Numerous magnates of the Kingdom, headed by John of Castile and Juan Manuel of Villena, opposed to the project of taking the city of Algeciras, preferring to carry out a campaign of plunder and devastation in Vega de Granada. In addition, John of Castile was resentful to the King because of the latter's refusal to hand him the municipality of Ponferrada, and Juan Manuel of Villena, although he wished to wage war against the Kingdom of Granada from his lands in Murcia, was forced by Ferdinand IV to participate together with his troops at the siege of Algeciras.

At that time, the Master of the Order of Calatrava made a raid on the border and obtained considerable booty, and on 13 March 1309 the Bishop of Cartagena, with the approval of the cathedral chapter of Cartagena, seized the city and of the castle of Lubrín, that later would be donated to him by Ferdinand IV. After the Cortes of Madrid, the King went to Toledo, where he waited for his troops to join him, while leaving his mother María de Molina in charge of the Kingdom's government, entrusting her with the custody of the royal seals.

The conquest of Gibraltar and the siege of Algeciras (1309)
In the campaign participated John of Castile, Juan Manuel of Villena, Diego López V de Haro, Juan Núñez II de Lara, Alonso Pérez de Guzmán, Fernán Ruiz de Saldaña, and other Castilian magnates and ricoshombres. Also took part in the enterprise the council militias of Salamanca, Segovia, Seville and other cities. For its part, King Denis of Portugal, father-in-law of Ferdinand IV, sent a contingent of 700 knights under the command of Martín Gil de Sousa, and James II of Aragon contributed to the expedition against Algeciras with 10 galleys. Pope Clement V, by the bull "Prioribus, decanis" issued on 29 April 1309 in the city of Avignon, granted Ferdinand IV a tenth of all the ecclesiastical revenues of his Kingdoms for three years, in order to contribute to the maintenance of the war against the Kingdom of Granada. From the city of Toledo, Ferdinand IV went to Córdoba, where the emissaries of James II of Aragon announced that he was ready to begin the siege of Almería. In the city of Córdoba Ferdinand IV again discussed the campaign plan, because his brother the Infante Peter of Castile, John of Castile, Juan Manuel of Villena and Diego López V de Haro, among others, were opposed to the project of besiege the city of Algeciras, since all of them preferred to plunder and devastate the Vega de Granada through a series of successive attacks that would demoralize the Granada Muslims. Nevertheless, the will of Ferdinand IV prevailed and the Castilian-Leonese troops prepared to besiege Algeciras. The last preparations of the campaign were made in the city of Seville, to which Ferdinand IV arrived in early July 1309. The provisions and supplies accumulated in the city of Seville by the Castilian-Leonese army were transferred by the Guadalquivir river, and then by sea to Algeciras.

On 27 July 1309, a part of the Castilian-Leonese army was found before the walls of the city of Algeciras, and three days later, on 30 July, arrived Ferdinand IV and John of Castile accompanied by numerous ricoshombres. James II of Aragon began to besiege the city of Almería on 15 August, and the siege lasted until 26 January 1310. A few days after the start of the siege of Algeciras, Ferdinand IV sent Juan Núñez II de Lara, Alonso Pérez de Guzmán, the Archbishop of Seville, the council of the city of Seville and the Master of the Order of Calatrava to besiege Gibraltar, who capitulated before the Castilian troops on 12 September 1309 after a brief and hard siege.

In mid-October 1309, John of Castile, his son Alfonso de Valencia, Juan Manuel of Villena and Fernán Ruiz de Saldaña, deserted and left the Christian camp located before Algeciras, being accompanied in their flight by others 500 knights. This action, motivated by the fact that Ferdinand IV owed them certain sums of money for the payment of their soldiers, provoked the indignation of the European courts and the protest of James II of Aragon, who tried to persuade the deserters, though unsuccessfully, to return to the siege of Algeciras. However, Ferdinand IV, who had the support of his brother, the Infante Peter, Juan Núñez II de Lara and Diego López V de Haro, persisted in his attempt to conquer Algeciras.

The scarcity and poverty of means in the Christian camp became so alarming that Ferdinand IV was obliged to pawn the jewels and crowns of his wife Queen Constance in order to be able to pay the soldiers and the crews of the galleys. Shortly afterwards arrived at the Christian camp the troops of the Infante Philip of Castile and the Archbishop of Santiago de Compostela, who came accompanied by 400 knights and a good number of peons. At the end of 1309, Diego López V de Haro became seriously ill as a result of a gout attack, which added to the death of Alonso Pérez de Guzmán, the rainy season that flooded the Christian camp, and the desertion of the John of Castile and Juan Manuel of Villena. Nevertheless, in spite of these adversities, Ferdinand IV persisted until the last moment in his objective to capture Algeciras, although in the end he abandoned this purpose.

In January 1310 Ferdinand IV decided to negotiate with the Granadians, who sent the arráez of Andarax as an emissary to the Christian camp. An agreement reached, which stipulated that in exchange for lifting the siege of Algeciras the Castilian sovereign would receive Quesada and Bedmar, in addition to 50,000 gold doblas, Ferdinand IV ordered to lift the siege at the end of January 1310. After the signing of the preliminary agreement Diego López V de Haro died, and María I Díaz de Haro, wife of John of Castile, took possession of the Lordship of Biscay. After this, John of Castile returned to the King the towns of Paredes de Nava, Cabreros, Medina de Rioseco, Castronuño and Mansilla. At the same time as Ferdinand IV ordered to abandon the siege of Algeciras, James II of Aragon ordered the siege of Almería to be lifted, without having managed to seize the city.

On the whole, the campaign of the year 1309 proved more profitable for the arms of the Kingdom of Castile and León than for the Kingdom of Aragon, since Ferdinand IV was able to incorporate Gibraltar into their dominions. The betrayal and desertion of the two relatives of the king, Juan Manuel of Villena and John of Castile was badly considered by all the European courts, that didn't save qualifiers to criticize the two Castilian magnates.

Conflicts with John of Castile and Juan Manuel of Villena (1310–1311)
In 1310, after the siege of Algeciras, Ferdinand IV sent Juan Núñez II de Lara to confer with Pope Clement V, to implore him not to permit the process against his predecessor Pope Boniface VIII, who had legitimized the marriage of the parents of Ferdinand IV in 1301, thereby legitimizing the Castilian King himself. Juan Núñez II de Lara was to inform the Pope about the causes that had motivated the lifting of the siege of Algeciras, and also had to petitioned, on behalf of Ferdinand IV, funds for the continuation of the war against the Kingdom of Granada. Pope Clement V tried to soften the animosity that King Philip IV of France felt towards the late Pope Boniface VIII, condemn the behavior of John of Castile and Juan Manuel of Villena during the siege of Algeciras, granted the Castilian monarch the tithes collected In his domains for a year, and sent various letters to the prelates of the Kingdom of Castile and León in which they were ordered to severely reprimand those who didn't collaborate with Ferdinand IV in the enterprise of the Reconquista. In the meanwhile, Ferdinand IV undertook again the war against the Kingdom of Granada. His brother the Infante Peter conquered the castle of Tempul and later went to Seville, where the King was. In November 1310, both brothers went to Córdoba, where a popular uprising had taken place against several knights of the city. Meanwhile, Dowager Queen María de Molina, who was in Valladolid, begged her son to join her there, so that the monarch might be present at the wedding of his sister, the Infanta Isabella with John, Viscount of Limoges and heir of the Duchy of Brittany. On the way to Burgos, Ferdinand IV stopped in the city of Toledo and confessed to Juan Núñez II de Lara that he planned to arrest or assassinate John of Castile, because he thought that if he still live, he would harm and hinder him in all his purposes. However, Juan Núñez II de Lara, in spite of his hatred for John of Castile, realized that the King didn't do it out of affection for him, and that if he helped Ferdinand IV to get rid of John of Castile, this would mean his own ruin.

Ferdinand IV arrived in Burgos in January 1311, and after the marriage of his sister, he planned to assassinate John of Castile, as a revenge for his desertion during the siege of Algeciras and, at the same time, to subdue the nobility, who again rebelled against the royal authority. However, the Dowager Queen advised John of Castile of the purposes of her son and he was able to escape. Ferdinand IV, accompanied by his brother Infante Peter, Lope Díaz de Haro, and by the troops of the council of Burgos persecuted John of Castile and his supporters, who took refuge in the city of Saldaña.

The King then deprived John of Castile of his title of Adelantado Mayor (who was granted to Juan Núñez II de Lara) and ordered the confiscation of lands and lordships that he had given to him and his sons Alfonso de Valencia and Juan The one-eyed, and the same luck was suffered by Sancho of Castile, cousin of Ferdinand IV and supporter of John of Castile. At the same time, Juan Manuel of Villena reconciled with the monarch and asked him to grant him the position of First Majordomo; Ferdinand IV, who wished that Juan Manuel would break his friendship with John of Castile, stripped Infante Peter of the position of First Majordomo and gave it to Juan Manuel of Villena, and in as a compensation for the loss of the title the King gave his brother the cities of Almazán and Berlanga de Duero, which he had previously promised to him.

At the beginning of February 1311, and although he had reconciled with Ferdinand IV, Juan Manuel of Villena left the city of Burgos and went to Peñafiel, reuniting shortly afterwards with John of Castile in Dueñas. The supporters and vassals of John of Castile, fearing the wrath of the King, prepared to defend him, among them Sancho of Castile and Juan Alfonso de Haro. In view of the situation, Ferdinand IV, who didn't want an open revolt of the supporters of John of Castile, in addition to wanting to dedicate himself exclusively to the war against the Kingdom of Granada, sent his mother to confer with John of Castile, his children, and supporters in Villamuriel de Cerrato. The conversations lasted fifteen days and the Dowager Queen was accompanied by the Archbishop of Santiago de Compostela and by the Bishops of León, Lugo, Mondoñedo and Palencia. The meeting concluded with the peace between John of Castile (who was worried about his personal security) and Ferdinand IV. This concord was opposed by both Queen Constance and Juan Núñez II de Lara, who still was distanced from John of Castile. Shortly afterwards, Ferdinand IV met with John of Castile in the municipality of Grijota, and both ratified the previous agreement orchestrated by the Dowager Queen in Villamuriel de Cerrato.

On 20 March 1311, during an assembly of prelates in the city of Palencia, Ferdinand IV confirmed and granted new privileges to the churches and prelates of his Kingdoms, and responded to their demands. In April 1311, being in Palencia, Ferdinand IV became seriously ill and had to be transferred to Valladolid, despite the opposition of his wife Queen Constance, who wished to transfer him to Carrión de los Condes, in order to be able to control the sovereign along with her ally Juan Núñez II de Lara. During the illness of Ferdinand IV discrepancies arose between the Infante Peter, Juan Núñez II de Lara, John of Castile and don Juan Manuel. While the King was in Toro, the Queen gave birth in Salamanca on 13 August 1311 to a son, the future Alfonso XI of Castile. The newborn heir of the Castilian throne was baptized in the Old Cathedral of Salamanca, and despite the King's wishes to entrust the guardianship of his son to his mother the Dowager Queen, the will of Queen Constance prevailed, who wanted (with the support of Juan Núñez II de Lara and Lope Díaz de Haro), that the custody of her son should be entrusted to the Infante Peter.

In the fall of 1311 a conspiracy arose which sought the overthrow of Ferdinand IV in favor of his brother Infante Peter. The conspiracy was carried out by John of Castile, Juan Núñez II de Lara and by Lope Díaz de Haro, son of the late Diego López V de Haro. However, the project failed due to the contundent refusal of the Dowager Queen.

Concord of Palencia and meeting of Calatayud (1311–1312)
In mid-1311, John of Castile and the principal magnates of the Kingdom threatened Ferdinand IV by ceasing to serve him, if the monarch didn't satisfy their requests. John of Castile and his followers demanded that the King replace his advisers and privates for John of Castile himself, the Dowager Queen, Infante Peter, Juan Manuel of Villena, Juan Núñez II de Lara and the Bishops of Astorga, Zamora, Orense and Palencia. Juan Manuel of Villena remained loyal to Ferdinand IV, because on 15 October the King had given him all the royal pechos (tributes) and rights of Valdemoro and Rabrido, except for the moneda forera of both places and the martiniega (another tribute) de Rabrido, which had been granted to Alfonso de la Cerda.

With the desire to achieve peace in order to continue with the Reconquista, Ferdinand IV agreed to sign the Concord of Palencia on 28 October 1311 with John of Castile and the rest of the magnates, and whose clauses were ratified in the Cortes of Valladolid in 1312. The King promised to respect the customs, fueros and privileges of the nobles, prelates, and subjects of the towns, and not to try to deprive the nobles of the rents and lands that belonged to the Crown. Ferdinand IV ratified that the custody of his son, the Infante Alfonso, would be entrusted to his brother, Infante Peter, to whom was also ceded the city of Santander. The King ceded to John of Castile the municipality of Ponferrada, on the condition that John would not establish any type of alliance with Juan Núñez II de Lara; John violated his word on 5 November, eight days after signing of the Concord.

In December 1311 Ferdinand IV meet in Calatayud with James II of Aragon. At that moment was celebrated the marriage of Infante Peter of Castile and the Infanta Maria of Aragon, daughter of James II, although some authors indicate that the marriage was celebrated in January 1312. 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.

Last period of the Ferdinand IV's life (1312)
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. In 1312 Sancho of Castile, Lord of Ledesma first-cousin of Ferdinand IV died; immediately the King went to Ledesma, that acted as a capital of the dominions of his cousin, and incorporated the dominions to the royal patrimony, after it had been proved that the deceased had no legitimate children. Ferdinand IV then went to Salamanca, and deprived his cousin Alfonso de la Cerda (who had rebelled again against him) of the municipalities of Béjar and Alba de Tormes.

On 13 July 1312, the King arrived in Toledo, after leaving the Infante Alfonso, heir to the throne, in the city of Ávila, and went to the province of Jaén, where his brother Infante Peter of Castile was besieging the town of Alcaudete. The King, after a short stay in the city of Jaén, went to the town of Martos, where he ordered the execution of the Carvajal brothers, accused of having murdered Juan Alonso de Benavides, private of Ferdinand IV, in Palencia. According to legend, since this is not included in the Chronicle of Ferdinand IV, the brothers were condemned to be introduced into an iron cage with sharp points inside and later to be thrown from top of the Rock of Martos, still inside the iron cage. The Chronicle of Ferdinand IV states that before dying, the brothers summoned the King to appear before the Court of God within thirty days.

After his stay in Martos, the King went to Alcaudete, where he awaited John of Castile, that should be united with his troops to the siege of the locality. However, John of Castile didn't appear for fear that Ferdinand IV would order his death. Sick of gravity, Ferdinand IV left the siege of Alcaudete and went to the city of Jaén at the end of August 1312.

On 5 September 1312, the garrison of Alcaudete was surrendered after three months of siege, and the Infante Peter went to the city of Jaén, where his brother the King was waiting for him. On 7 September, the day of Ferdinand IV's death, both brothers agreed to help Nasr, Sultan of Granada, with whom a truce had been agreed, and to help him in his fight against his brother-in-law Ferrachén, arráez de Málaga, who had rebel against him.

Different versions of the king's death
Ferdinand IV died on 7 September 1312 in the city of Jaén, without anyone seeing him die. History and legend have intertwined indissolubly in what concerns the death of the monarch, who received at his death the nickname of "the Summoned", because of the mysterious circumstances in which it occurred. Ferdinand IV died aged 26, and when he died he left an only 1-year-old son, who would reign as Alfonso XI of Castile.

The Chronicle of Fernando IV, written around 1340, almost thirty years after the death of the king, describes the death of the Castilian-Leonese monarch in Chapter XVIII of the work, and the Carvajal brothers, thirty days Before that of Ferdinand IV, although it does not specify how the latter died:

"The King left Jaén, and went to Martos, and being and ordered to kill two knights who were in his house, because they were blamed for the death of a knight who was say they killed when the King was in Palencia, after leaving the house of the King one night, namedh Juan Alonso de Benavides. It is these knights, when the King ordered them to be killed, seeing that they were killed with treason, they said that they would summoned the King that he would appear before God with them on a trial after thirty days from that moment. They were dead, and the next day was the King with his army in Alcaudete, and every day he waited for the infante John of Castile, according to what was expectred from him...It is the King being in this siege of Alcaudete, took a very great ailment in such a way that he came to Jaén with the disease, and ate meat every day, and drank wine...And the day Thursday, seven days of September, the eve of Sancta Maria, the King went to bed, and a little after half a day they found him dead in hs bed, so that no one saw him die. This Thursday, the thirty days of the summons of the knights that he had killed in Martos were fulfilled..."

In the chapter III of the Chronicle of Alfonso XI, the death of Ferdinand IV is described in the same way as described in the Chronicle of Ferdinand IV. The historian Diego Rodríguez de Almela, in his work Valerio de las historias escolásticas y de los hechos de España, which was written around the year 1472, related as follows the death of the monarch:

"King Ferdinand IV of Castile, who took Gibraltar, was in Martos, and were accused before him two knights, called the one Pedro Carbajal and the other Juan Alfonso de Carbajal, his brother, who both belonged to his court, that a night, while the King was in Palencia, they killed a knight named Gómez de Benavides, loved very much by the King, giving many indications and presumptions because it seemed that they had been killed him. King Ferdinand, using rigorous justice, made the two brothers arrest, and thrown from top of the Rock of Martos; before they were thrown out they said that God was their witness and knew the truth that they were not guilty in that death, and that the King ordered them to be kill without reason, that he was summoned from that day that they died in thirty days that he should appear with them in judgment before God. The knights were killed, and King Ferdinand came to Jaén. He realized that two days before the time was over he felt angry, ate meat and drank wine. As the day of the thirty-day period that the knights he killed placed him, he wanted to leave for Alcaudete, that his brother the infante Peter had taken the Moors, ate early, and lay down to sleep, which was in summer; and when they came to awaken him, they found him dead in bed, that no one should see him die. A great deal must be paid to the Judges before they proceed to execute justice, especially of blood, until they truly know the fact that justice must be carried out. As in the Genesis it reads: whoever draws blood without sin, God will demand it. This King did not have the way that suited the execution of justice, and therefore ended as it."

Martín Ximena Jurado, a historian and chronicler of the 17th century in his work Catálogo de los Obispos de las Iglesias Catedrales de Jaén y Anales eclesiásticos de este Obispado, described the Royal Church of Santa Marta in the city of Martos, where the remains of the Carvajal brothers, executed by order of Ferdinand IV, are buried. While describing the grave of the two brothers, he provided some information on the death of the monarch:

"And more below it (it refers to the side chapel of the high altar on the side of the Epistle of the Royal Church of Santa Marta de Martos) you see on the wall a very small, humble arch near the ground and on it the next inscription, which manifests itself to be the Burial of the two knights Carvajal brothers, who were killed in the Rock of that village by order of the king Ferdinand the Fourth, who called the Summoned, because he was dead within the term that these knights pointed out to him, quoting it for the Divine Tribunal for the injustice that is said to them (Here is transcribed the inscription placed on the tombstone of the Carvajal brothers): Year 1310 by order of the King Ferdinand IV of Castile were demolished from this Rock brothers Pedro and Ivan Alfonso de Carvajal, knights of Calatrava, and buried in this place. Don Luís de Godoy, and the licenciado Quintanilla, knights and visitors of this Party, had this memory renewed in the year of 1595." Juan de Mariana, writer and historian of the 17th century, described the conviction and execution of the Carvajal brothers in the city of Martos, and for the first time established the possible relationship between the legend of the emplacement before the Court of God of Ferdinand IV, and the emplacements suffered by Pope Clement V and King Philip IV of France, both in 1314, two years after the death of the Castilian sovereign. The last Grand Master of the Knights Templar, Jacques de Molay, was burned at the stake in Paris in March 1314, and before his death, according to tradition, he ordered to appear before God within a year, Pope Clement V, King Philip IV of France and Guillaume de Nogaret, responsible for the suppression of the Order of the Temple and the death of many of its members:

"The King, who was very careless of the events, set out for Alcaudete, where his army was. There he suffered such a great disease that he was forced to return to Jaén, but the Moors moved to deliver the town. The disease increased every day, so the King could not negotiate on his own. Still rejoicing at the news that the town was taken, he resolved in his thoughts new conquests, when on a Thursday which was counted seven days in the month of September, after having eaten retired to sleep, after a while they found him dead. He died in the flower of his age, which was twenty-four years and nine months, so that his business was prosperous. He had the Kingdom for seventeen years, four months and nineteen days, and it was the Fourth of his name. It was understood that his little order in eating and drinking would lead to death: others said that it was God's punishment that from the day he was quoted, until the time of his death (a wonderful and extraordinary thing) there were precisely thirty days. That is why among the Kings of Castile was named Ferdinand the Summoned. His body deposited in Córdova, because of the heat that still lasted, could not be taken to Seville nor to Toledo were was customary to take place the royal burials. The fame and the above-mentioned opinion, conceived in the minds of the common people, were increased by the death of two great princes who for the same reason died in the next two years: these were Philip the King of France and Pope Clement, both summoned by the Templars before the divine court while with fire and all kinds of torments sent them to punish and persecuted all that religion. Such was the fame that ran, if true if false, it is not known, but it is believed to be false: in what happened to King Ferdinand no one doubts..."

Historian and archaeologist Francisco Simón y Nieto, in his book ''Una página del reinado de Fernando IV. Pleito seguido en Valladolid ante el rey y su corte en una sesión, por los personeros de Palencia contra el Obispo D. Álvaro Carrillo, 28 de mayo de 1298'', published in 1912, noted that the ultimate cause of the death of Ferdinand IV may have been due to a coronary Thrombosis, but without discard others, such as Intracerebral hemorrhage, acute Pulmonary edema, Angina pectoris, Myocardial infarction, Embolism, Syncope or others.

Burial
In September 1312, shortly after his death, the mortal remains of Ferdinand IV were transferred to the city of Córdoba, and on 13 September they were buried in a chapel of the Mosque–Cathedral of Córdoba, although his corpse should have been buried in the Toledo Cathedral next to his father Sancho IV or in Seville Cathedral with his paternal grandfather Alfonso X and his paternal great-grandfather Ferdinand III.

However, due to the high temperatures that occurred in September 1312, Queen Constance of Portugal, widow of Ferdinand IV, and the Infante Peter of Castile, brother of the late King, decided the burial of the mortal remains Of Fernando IV in the Mosque–Cathedral of Córdoba. Queen Constance also founded six chaplaincies and ordered that in September was celebrated the perpetual anniversary in memory of the late King. Within a year of the monarch's death, four candles burned permanently in his grave, and daily, during that year, the bishop of the city and the cathedral chapter sang once a day prays for the soul of the King. In 1371, the mortal remains of Ferdinand IV and those of his son Alfonso XI were deposited in the Royal Chapel of the Mosque–Cathedral of Córdoba, whose construction had ended that same year.

In 1728, Pope Benedict XIII issued a bull for which the Royal Chapel of the Mosque–Cathedral of Córdoba was attached to the Church of Saint Hippolytus of Córdoba, and that same year, after several requests on the part of the canons of Saint Hippolytus, who had requested Philip V to have the remains of Ferdinand IV and Alfonso XI transferred to his Collegiate Church, the King authorized the transfer of the remains of the two monarchs.

In 1729 works for the completion of the Church of Saint Hippolytus were begun, which were terminated in 1736, and on the night of 8 August 1736, with all honors, the mortal remains of Ferdinand IV and Alfonso XI were transferred to the Royal Collegiate Church of Saint Hippolytus, where they rest since then. At the same time, the canons of Saint Hippolytus transferred to their Collegiate Church all the furniture of the Royal Chapel of the Mosque–Cathedral of Córdoba.

In the first section of the presbytery of the Royal Collegiate Church of Saint Hippolytus, housed in two arcosolium, are the tombs that contain the mortal remains of Ferdinand IV (located on the side of the Epistle) and the one containing the remains of his son Alfonso XI (which is on the side of the Gospel). The remains of both monarchs are deposited inside red marble urns, built with marble from the disappeared Monastery of San Jerónimo of Córdoba, and both were made in 1846, commissioned by the Monuments Commission.

Until that moment, the remains of both monarchs were placed in two wooden coffins in the presbytery of the church, where they were shown to distinguished visitors. On the roofs of both sepulchres are placed pillows on which are deposited a crown and a scepter, symbols of royalty.

Marriage and issue
In Valladolid on 23 January 1302, Ferdinand IV married with Constance, daughter of King Denis of Portugal. They had three children:


 * Eleanor (1307–1359), married firstly in 1319 with James of Aragon (the union was never consummated and annulled) and secondly in 1329 with King Alfonso IV of Aragon, brother of her first husband. She was killed in Castrojeriz by orders of her nephew, King Peter of Castile.
 * Constance (1308–1310), who died in infancy. She was initially buried in the disappeared Convent of Santo Domingo el Real in Madrid, and in 1869 her remains were where translated to the crypt of the Church of San Antonio de los Alemanes, where still remained.
 * Alfonso XI (1311–1350), successor of his father in the Castilian-Leonese throne. He died of victim of the Black Death during the Fifth Siege of Gibraltar.