Ferdinand IV (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 the regency of his kingdoms was entrusted 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 worked to secure her son's place on the throne. He faced uprisings from 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, Juan Manuel, Prince of Villena, Ferdinand's first cousin once removed, the grandson of his great-grandfather and namesake Ferdinand III.

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 he also conquered Alcaudete. 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.

Early Life (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 as King, he would show them a profound gratitude.

Even during 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, both of whom died young. The death of Sancho IV a year later put an end to the negotiations with the French court.

The Regency of María de Molina (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 nine days of mourning. 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 never received papal approval, which was required due to consanguinity rules, all their children (including the now Ferdinand IV) were legally illegitimate, so the Dowager Queen faced numerous problems to keep her son on the throne.

Ferdinand and María's incessant struggles with the Castilian nobility were led by the Infante John of Castile "el de Tarifa", Lord of Valencia de Campos (who claimed the throne of his brother Sancho IV) and the Infante Henry of Castile the Senator, son of Ferdinand III and great-uncle of Ferdinand IV, and were later joined by Alfonso and Ferdinand de la Cerda, who claimed the throne through their father Fernando, eldest son of King Alfonso X, who predeceased the King. the Infantes de la Cerda were supported by the Kings of France and Aragon, and by their grandmother 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 realm's instability. 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, worked to weaken and destabilize Ferdinand's rule.

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 was entrusted with his custody (thanks to the support of the cities with votes in the Cortes). During the Cortes, John of Castile, Lord of Valencia de Campos, left Granada to occupy the city of Badajoz, which he could not do, but he did manage to seize Coria and the castle of Alcántara. He later traveled Kingdom of Portugal, where he urged King Denis to support his claim to the throne and declare war on his neighbor.

In the summer of 1295, when the Cortes of Valladolid ended, the Dowager Queen and Henry of Castile met in Ciudad Rodrigo with King Denis of Portugal, to whom they ceded several border castles and localities. At the same meeting, the marriage contract between Ferdinand IV and Denis' daughter Constance was renewed, and it was decided that Ferdinand's younger sister, the Infanta Beatrice of Castile, would marry the Infante Afonso, heir to the Portuguese throne, the future Afonso IV. At the same time, Diego López V de Haro was confirmed the possession of the Lordship of Biscay over the claims of María I Díaz de Haro, and John de Tarifa recognized (albeit 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 city of Mayorga, while Henry of Castile went to the Kingdom of Granada to arrange a peace between the Sultan Muhammed II al-Faqih and Ferdinand IV. On 25 August 1296, the Infante Peter of Aragon, son of King Peter III died of the plague while commanding the Aragonese army at Mayorga, losing with him John of Castile one of his main supporters. Due to the loss of their leaders, the remaining troops were forced to lift the siege.

While John of Castile and Juan Núñez II de Lara waited for the King of Portugal and his troops to join them in their siege of Mayorga, where the Dowager Queen María de Molina and Ferdinand IV had sought 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, now Ferdinand IV faced enemies to the North, East, and West.

When Henry of Castile, still in Granada, learned that the Aragonese and Portuguese had left Castile, and that the Dowager Queen was besieging Paredes de Nava, he decided to return to Castile, fearing for his position as guardian of Ferdinand IV. However, under pressure from Alonso Pérez de Guzmán and other knights, he attacked the Granadans, who had recently attacked the Castilians. Four leagues from Arjona, a battle was fought with the Granadans, in which Henry of Castile would have lost his life if Alonso Pérez de Guzmán had not saved him. The Castilians suffered a complete and total defeat, and their camps were looted by the Granadans. 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 Cuéllar of 1297, conveden by the Queen María de Molina, Henry of Castile wanted to return the city of Tarifa to the Sultan of Granada, but the opposition of María de Molina prevented him from doing so. In these Cortes, Henry of Castile managed to obtain the Castle of Alarcón for his nephew Juan Manuel, Prince of Villena in compensation for lost the town of Elche after its conquest by the Aragonese, despite the opposition of the Dowager Queen, who feared setting a precedent that may weaken royal authority in favor of the . Shortly before the signing of the Treaty of Alcañices in the fall of 1297, Juan Núñez II de Lara, who supported the rival claimants Alfonso de la Cerda and John of Castile, was besieged in Ampudia, but managed to escape.

The Treaty of Alcañices (1297)

In 1296 the Dowager Queen María de Molina had threatened to break her agreement with the King of Portugal made the previous year if his attacks the Castilian borderlands persisted. King Denis capitulated and agreed to cease the attacks and returned home with is troops.

Through the Treaty of Alcañices, the borders between Castile and Portugal were solidified, and King Denis received a series of fortresses and towns in compensation for breaking his alliances with James II of Aragon, Alfonso de la Cerda, John of Castile and Juan Núñez II de Lara.

The Treaty of Alcañices once again confirmed the marriages between Ferdinand IV and the Infanta Constance (Constança) of Portugal and of Afonso of Portugal, Infanta Beatrice (Beatriz), 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, 1st Count of Barcelos (who would later marry Ferdinand IV's illegitimate half-sister Teresa Sánchez), to aid 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 a series of towns that were taken from his father King Afonso III by Alfonso X of Castile. The Portuguese king also received the towns of Almeida, Castelo Bom, Castelo Melhor, Castelo Rodrigo, Monforte, Sabugal, Sastres and Vilar Maior. Castile received in exchange the towns of Ayamonte, Santiago de Alcántara, Herrera de Alcántara, Valencia de Alcántara, Aroche, and Aracena. 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 and defend each other against both foreign and domestic enemies. 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. The effects of this treaty were long-lasting, because the border between the two kingdoms has hardly been modified in the more than 700 years since its ratification, thus becoming one of the longest frontiers of the European continent.