# Treaty of Badajoz (1267)

The Treaty of Badajoz was signed in Badajoz on 16 February 1267 between King Alfonso X of Castile and King Afonso III of Portugal, establishing mutual assistance and friendship between the parties. The accord would see Alfonso X renounce all rights to the Kingdom of the Algarve, including a personal agreement with Denis of Portugal to support Alfonso with fifty knights. Following the treaty, Alfonso X continued to use the title king of the Algarve although it was probably used in reference to the territory of Niebla. The treaty also reinforced Portugal's sovereignty, by confirming the end of vassalage relations between Portuguese kings and the monarchs of León. Lastly, the border between the two kingdoms was agreed as the course of the Guadiana river, between its mouth and the river Caia. This led to the concession of some conquered territory by Portugal to Castile to the east of the river.
The Treaty of Badajoz was a foundation in setting the borders between the two kingdoms and paramount for the signing of the Treaty of Alcañices in 1297. This would settle the Portuguese border with Castile until 1801, when another Treaty of Badajoz was signed, when Portugal ceded a number of territories, including the town of Olivença.

## Background

The Treaty of Badajoz has its origins in territorial disputes, primarily over claims to Algarve, and dynastic struggles among the Christian kingdoms of Castile and Portugal during the 13th century. While Castile had several agreements with the Kingdom of Aragon to the East delimiting their territory, no such agreement existed with Portugal. Furthermore, the Treaty of Sahagún from 1158 between the kingdoms of León and Castile had attributed León the right to conquer the territories between Lisbon and Niebla and even contemplated the annexation of Portugal.
In 1226, Sancho II of Portugal and the Portuguese military orders initiated a southward territorial expansion against the taifas of Al-Andalus, conquering the Alentejo region. In 1245, a papal bull asked for the resigning of Sancho II in favor of his brother Afonso III, leading to a civil war lasting until 1248. Sancho II requested Castile's help, but he would ultimately lose the war, fleeing into Castile and leading to some animosity between the two kingdoms.
Between 1248 and 1251, Afonso III continued Sancho II's territorial expansion and attacked the Taifa of Niebla, which was under Castilian vassalage. The king took advantage of the taifa's weakness, Castile's distractions with their primary focus on the Guadalquivir valley and unclear Castilian jurisdiction over the region. With this incursion, Portugal conquered Aroche and Aracena and completed the conquest of the lands in Algarve, including Albufeira, Loulé, Tavira and Faro. Castile contested this expansion on the lands of its vassal Ibn Mahfuz, leading to tensions along the eastern border between Portugal and Castile until a truce arose in 1250.
With the ascension of Alfonso X into the Castilian throne in 1252, tensions worsened once more. The Castilian king asserted their claim to the region by visiting to the borderlands, restoring the bishopric of Silves and granting the disputed towns of Aroche and Aracena to the council of Seville. Portugal responded with protests to Pope Innocent IV, who mediated a peace treaty signed in Chaves in May 1253.
Under the 1253 agreement, a provisional agreement was found for the lands in Algarve and Afonso III would marry Alfonso X's illegitimate daughter Beatrice of Castile. Afonso III would receive Algarve as a fief, while Alfonso X would retain certain financial rights over the region. All rights to Algarve would then be transferred to the first male heir of Afonso III once he reached the age of seven. This agreement did not settle the matter of the towns east of the Guadiana and was seen negatively by the Portuguese nobility, but it paved the way for the Treaty of Badajoz. In 1261, Denis of Portugal was born, son of Afonso and Beatrice and grandson of Alfonso X, temporarily improving diplomatic affairs.

### The agreement of 1264

The Castilian conquest of the Taifa of Niebla in 1262 reignited tensions between Portugal and Spain and led to skirmishes along the rivers Guadiana and Caia. On April 20, 1263, Alfonso X appointed a commission to negotiate peace and friendship, and on 8 June, he formally renewed his alliance and friendship with Afonso III.
On September 20, 1264 an agreement was made, where Alfonso X renounced his rights over Algarve in favor of Denis of Portugal, while retaining vassalage rights and requiring a minimum military support of fifty knights from Denis. Some castles at the border would also be held by Alfonso X as guarantees for the fulfillment of this obligation. Lastly, following the agreement, the territories of Aroche and Aracena, may have been transferred to Castilian rule.
While Denis held the right to the lands in Algarve, it was Alfonso III who effectively controlled them, as highlighted by the forals (charters) given to the towns of Silves, Tavira, Faro, and Loulé.
Following the agreement, Afonso III, on behalf of Denis, supported Alfonso X in handling a Mudéjar revolt, both on land and on sea. Furthermore, he requested financial contributions from Portuguese towns and cities and placed Portuguese garrisons on high alert at the border.

## The treaty

The Treaty of Badajoz was signed on February 16, 1267 and it led to an agreement over part of the border between Portugal and Castile, a formal renouncing of Castilian claims to Algarve and an affirmation of Portuguese sovereignty.
In terms of resolving border disputes, the treaty, established the Guadiana River as the border between Castile and Portugal from the Caia River confluence (near Elvas) to the sea. Effectively, this forced Portugal to surrender Aracena, Moura, Serpa, and Aroche located east of the boundary line. North of the boundary line, Portugal was able to maintain Arronches, Alegrete, and Elvas, but was forced to capitulate Valencia de Alcántara and Marvão. The frontier in Ribacoa and east of the Caia River remained undefined, necessitating further negotiations. This issue would not be completed until the Treaty of Alcañices in 1297, for which the Treaty of Badajoz was paramount. As a result of this agreement, Alfonso X effectively renounced his claims on Algarve and he commanded his lieutenants to surrender the castles they controlled in Algarve to the Kingdom of Portugal.
In the treaties parties also agreed to end the historical military tribute that Portuguese kings owed to the monarchs of León. Denis of Portugal would also be relieved of his obligations to provide Castile with 50 knights, agreed on the 1264 agreement. Historians have debated why Alfonso X agreed to renounce these vassalage relations, one option being associated with a visit of his grandson Denis, where he was knighted. Alfonso's brother Manuel supported this decision, considering the Portuguese tribute an outdated relic of the past.