The Castilian Civil War of 1437–1445 was a civil war in which two noble factions fought for power in the Crown of Castile. On one side was Constable Álvaro de Luna, King John II of Castile, and Henry Prince of Asturias. On the other side was the noble League led by Infantes of Aragon John and Henry, sons of Ferdinand of Antequera, who was the regent of Castile during the minority of John II. Although the Infantes of Aragon faction won in 1441, imposing their conditions in the Medina del Campo ruling, the final victory went to the royalist faction and the Constable, who won the decisive battle of Olmedo. According to historian Carme Batlle, Álvaro de Luna is primarily responsible for the war. Following his victory over the Infantes of Aragon during the truces of Majano, Luna's "authoritarian excesses" escalated and led to a civil war. Although Batlle places the war's start in 1439.

Arrest of Pedro Manrique and Castronuño agreement (1437-1439)

After the defeat of the Infantes of Aragon in the Castilian–Aragonese War of 1429–1430, the position of the Constable Álvaro de Luna at the Castilian court was consolidated, but after a few years a faction of the nobility began to oppose the almost absolute power that he had achieved thanks to King John II's trust in him. One of the leaders of the group was Pedro Manrique, the Adelantado Mayor of León. On August 13, 1437, he was apprehended in Medina del Campo on the king's orders, at Álvaro's request. This event sparked a period of aristocratic discord in Castile that Jaume Vicens Vives stated escalated into a civil war. Following the arrest of Pedro Manrique, his supporters and relatives rose in rebellion alongside nobles who opposed Álvaro de Luna. These nobles were led by Fadrique Enríquez, the Admiral of Castile, as well as the Counts of Benavente, of Ledesma, and of Valencia de John, namely Rodrigo Alonso Pimentel, Pedro de Estúñiga, and Pedro de Acuña y Portugal, respectively.

In August 1438, Pedro Manrique escaped from confinement in Fuentidueña de Tajo Castle. In February 1439, he and Castilian Admiral Fadrique Enriquez signed a letter to King John II demanding the banishment of Constable Alvaro de Luna's court "with all his relatives and people, so that Your Grace may remain in all of your free power." In the next month, the rebellious aristocrats surprised Valladolid, prompting King John II to seek assistance from the Infantes of Aragon, including John, the Navarrese king consort. He obtained royal permission to cross the border in accordance with the stipulations of the Concord of Toledo of 1436. On April 6, 1439, he convened with the king in Cuéllar, where he met with the court and the primary unit of the Constable's army. He was joined by his brother, Archbishop of Toledo Juan de Cerezuela, and a group of nobles who supported him, including the Master of the Order of Alcántara Gutierre de Sotomayor, the Count of Haro Pedro Fernández de Velasco, and the Bishop of Palencia, Gutierre Álvarez de Toledo. John was accompanied by his brother, Infante Henry. However, Henry soon joined the side of the revolted nobles when they promised him the return of all his possessions confiscated at the end of the Castilian-Aragonese War of 1429-1430, as well as the mastery of the Order of Santiago, which he had previously held.

In June 1439, John, King of Navarre, convened leaders from two opposing factions in Tordesillas. The purpose was to negotiate an agreement without resorting to armed conflict. On one side were King John II himself, the Constable Álvaro and the Count of Castro; on the other, the Admiral of Castile, the Adelantado Mayor of León, the Count of Benavente and the Comendador Mayor of Castile. No agreement was reached, as the nobles supporting Álvaro de Luna refused to return the goods they had confiscated from the Infantes of Aragon in 1430. A skirmish occurred a few days after the unsuccessful Tordesillas meeting in Roa, where the armies of the Count of Ribadeo, belonging to Álvaro de Luna's faction, clashed with the rebel nobility who had formed a League. However, the discussions did not come to an end, and a temporary resolution was reached in October 1439, referred to as the Castronuño agreement, that inflicted a six-month banishment from the court on Álvaro de Luna.

Medina del Campo ruling (1439-1441) Álvaro de Luna violated the Castronuño agreement by maintaining communication with the king through the nobles of his faction, who were present at court. This prompted intervention from both John of Navarre and the nobles of the League, who demanded that King John II "swear not to deliver or take any action without their advice." On January 17, 1440, the day after receiving the message, the king chose to flee the court located in Madrigal with the prince of Asturias and the noble supporters of Alvaro. In the face of this attitude by King John II, the King of Navarre abandoned the position of mediator he held until then and sided with the nobiliary League. So did his sister, Queen Maria, wife of the Castilian king, and the Count of Haro Pedro Fernandez de Velasco, guarantor of the "Seguro de Tordesillas" which had facilitated the gathering of the ringleaders in the aforementioned town.

John of Navarre led his armies towards Bonilla de la Sierra, where King John II had sought refuge after escaping from Madrigal. John's forces captured Ávila, prompting John II to enter negotiations and appoint an embassy to meet with John and the other leaders of the nobiliary League in Madrigal. There, the king's ambassadors received a memorial addressed to John II in which the government of Alvaro de Luna was harshly criticized and who was even accused of being a homosexual, "which was always more reviled in Spain than any other known to man", and of having bewitched King John II: "the said Constable has bound and tied up all your bodily and animal powers by magical and deavollic enchantments". Finally, it was demanded that the king should order "the restitution of his royal liberty and power and his wealth".The document made a detailed account of the faults attributed to Don Alvaro; forgetfulness of his birth and ambition to bid on "all the great and noble of your kingdoms"; hoarding and control of the public treasury and the mints; immoderate increase of the taxes; direction of the royal treasury towards its own peculium and situation of funds abroad, specifically in Venice; protection of illicit games; intervention in the ecclesiastical elections; purchase of ecclesiastical goods to the detriment of the treasury; management of the royal grants and appointments; usurpation of municipal functions; coercion of members of the royal council; seizure of tenures and captaincies of castles; general impersonation of the monarch. After this list of accusations, in which acts typical of an authoritarian monarchy were intermingled with the ailments of all privation, the memorial went on to consider the abuses of power of the Constable with respect to his enemies: fomenting tares among the great men of Castile; persecution of the princes of Aragon; deaths of the Count of Trastámara, the Count of Luna and Fernán Alonso de Robles; premeditated imprisonment of Pedro Manrique. At the same time, support for the king and the Constable was declining as cities began to switch sides and align with the League, demonstrated by the Cortes held in Valladolid in May 1440. Finally King John II agreed to meet with the Infantes of Aragon and the leaders of the League in Valladolid, accepting the banishment from the court of the most prominent supporters of Álvaro de Luna: the Archbishop of Seville Gutierre Álvarez de Toledo, the Bishop of Segovia Lope de Barrientos and the Count of Alba Fernando Álvarez de Toledo y Sarmiento. To cement the pact, on September 15, 1440, the wedding of the Prince of Asturias, Henry, and Doña Blanca, daughter of the King of Navarre, was celebrated in Valladolid, as stipulated in the Concord of Toledo.

But in early January 1441, King John II fled from the court in Arévalo with the Prince of Asturias to gain independence from the Infantes of Aragon and the League. They traveled to Avila, where the Archbishop of Seville and the Bishop of Segovia, along with other prominent supporters of Alvaro de Luna, awaited them. There they decided to reach out to the Constable for a consultation on the kingdom's affairs and disputes. The interview occurred on January 6 in El Tiemblo. The next day, they issued an ultimatum to the League, warning them of war if they did not dismantle their forces. The League demanded that the Constable "leave the kingdom" as a prerequisite for any agreement, and on January 21 they published a manifesto in Arévalo against Álvaro de Luna, calling on the Castilian cities to join the League in the war they would wage against the Constable. The document began as follows: "You well know how much damage and harm these kingdoms have suffered from twenty years to the present the favouritism of the Constable with the said lord king."Then they reiterated the arguments already presented to the ambassadors of John II in Madrigal, with the addition of a new one: that Alvaro de Luna intended to tyrannize the Prince of Asturias and Queen Maria. It ended by saying that the signatories, the Infantes of Aragon and the noble leaders of the League:"[have] agreed to reverse and we revert to the said Constable any security and assurances... and we revoke and annul them... and we send him to challenge by our procurators as an enemy of the said lord king... and as a sower of scandals and tumults and discords."The League's troops initiated the first battles with the opposing factions in the Tagus valley. After leaving Arevalo, they traversed the Guadarrama mountain range and attacked Maqueda and Illescas, which were under the control of the Constable and his brother, the Archbishop of Toledo. Íñigo López de Mendoza captured Illescas and Prince Henry took control of Alcalá de Henares. However, the League's troops were unsuccessful in their attempts to capture Maqueda, a stronghold belonging to Álvaro de Luna, as well as the Royal Alcázar of Madrid, where Álvaro's son Juan de Luna y Pimentel was fortified. Meanwhile, other League forces seized territories of the Constable to the north of Sierra de Guadarrama, including Riaza, Sepúlveda and Ayllón.

The Constable launched a counterattack in Tagus Valley, successfully defeating the League's forces in the battle of Torote that occurred on April 7, 1441 near the Torote River and Alcalá de Henares, as well as near Arroyo de Molina by Montánchez. In late April, he besieged Torrijos, where Infante Henry was staying, asking for the help of most of the troops of the league that were concentrated in Arévalo under the command of his brother, John of Navarre. The royal army left Avila to assist Henry in Torrijos after John's forces departed, in accordance with a plan agreed upon by John II and the Constable. On May 15, the army captured Medina del Campo, Castle of La Mota, and Olmedo, all owned by John. The king's endorsement of Constable Alvaro de Luna compelled the League to view John II as their adversary, directing their forces against him. Consequently, the majority of League forces that had laid siege to Maqueda lifted the siege and returned across the Guadarrama mountain range to Medina del Campo, where John II's army was situated.