The Treaty of Badajoz, 1801: how Portugal lost Olivença
Pushed by Napoleon, Spain invaded the Alentejo in May 1801. Within eighteen days Portugal had signed away Olivença and promised to shut its ports to Britain, and it still had to buy peace from France.

At a glance
- The Treaty of Badajoz, dated 6 June 1801 and signed by Luís Pinto de Sousa Coutinho for Portugal and Manuel Godoy for Spain, ended the War of the Oranges, a Spanish invasion of the Alentejo that began on 20 May by Godoy's account; other accounts give 15 or 21 May.
- Spain handed back every town it had taken except Olivença, which it kept “as a conquest” with its territory on the left bank of the Guadiana, about 430 to 450 square kilometres.
- Portugal promised to close its ports to British ships. A separate treaty with France, signed the same day by Lucien Bonaparte, added a secret indemnity of 15 million livres tournois.
- Napoleon refused to ratify the French treaty, and Portugal had to sign a harsher one in Madrid on 29 September 1801: 20 million livres and a new border in Guiana.
- Godoy wrote in his memoirs that he sent Queen María Luisa two branches of oranges cut under fire in the ditches of Elvas, a gift that drew “so many epigrams” and is usually linked to the war's nickname.
Oranges from the ditches of Elvas
On Wednesday 20 May 1801, the day set for the march, a Spanish army crossed from Badajoz into the Alentejo, Portugal's great southern plain. Its commander, Manuel Godoy, later wrote that it entered Portugal “with solemn display”, drove the Portuguese in front of it back inside the fortresses of Elvas and Campo Maior, and took up positions to besiege both. The date is Godoy's, and the historian Francisco Pereira Galego also uses it, though elsewhere he gives 15 May; Rui Rosado Vieira gives 21 May.
Some of his light infantry chased the retreating Portuguese right up to the walls of Elvas, a fortress Godoy ranked among the principal ones in Europe, and into the gardens in its ditches. There, under fire from the bastions, they cut two branches of oranges and carried them back to their general, together with a few prisoners.
“I almost forgot the two branches of oranges I sent to the queen, about which so many epigrams have been thrown. These branches were cut in the ditches of Elvas when, on 20 May, the enemy was shut up inside the fortress. Fire rained from the flanks on the brave men who made this show, and with the branches they also brought back some prisoners.”
The branches went to Madrid for Queen María Luisa, and Godoy made the five soldiers, from the Barbastro light infantry, sergeants. The jokes followed, and the short war has been known ever since as the War of the Oranges, the Guerra das Laranjas in Portuguese. Godoy never says outright that the name came from his gift. A nineteenth-century biography of General José de Urrutia, quoted by the historian António Ventura, says the campaign was named after oranges for its insignificance.
The same day the border town of Olivença, on the left bank of the Guadiana, was summoned to surrender and gave in with Spanish assault troops ready to go in; Juromenha, across the river, followed at midnight. Within eighteen days, by Godoy's count, the fighting was over. A peace treaty dated 6 June 1801 at Badajoz returned every town Spain had taken except one. Spain holds Olivença to this day.
A small kingdom between France and Britain
In 1801 Portugal was governed by the Prince Regent João in the name of his mother, Queen Maria I. Its oldest ally was Britain, on whose trade it depended. Next door, Spain was ruled by Charles IV, whose daughter Carlota Joaquina was João's wife.
The two Iberian crowns had fought together against revolutionary France. Under a treaty of July 1793, 5,400 Portuguese troops served in the Roussillon and Catalonia campaigns. Then in 1795 Spain made a separate peace with France at Basel without telling Lisbon, and soon became France's ally. Portugal was left, in theory, still at war with the French Republic, and more exposed than before.
In France, Napoleon Bonaparte had taken power as First Consul and was negotiating with Britain. He wanted Portugal as a bargaining chip. “The Republic must take from the English the only ally they have left on the continent,” he wrote to his foreign minister, Talleyrand. Portuguese land seized in war could be traded at the peace table.
Spain had been preparing for years. The historian António Ventura has published four Spanish studies for an invasion of Portugal written from 1797 onwards; one reckoned that Portugal could raise 30,000 to 40,000 men plus militia. In the end Godoy chose the obvious route, through the open Alentejo between Badajoz and Lisbon.
At the end of January 1801 France and Spain signed a convention. Portugal was told to give up the British alliance, close its ports to British ships and open them to French and Spanish ones, pay indemnities to both, settle its borders with Spain in Brazil, and hand over territory holding a quarter of the population of European Portugal as a pledge until Britain returned Trinidad, Minorca and Malta.
Napoleon sweetened the deal for Charles IV with a throne in Italy for his daughter, the Infanta María Luisa, who shared her mother the queen's name. Charles, who had hesitated to attack a court where his own daughter Carlota Joaquina was princess, gave up warning Lisbon, and Godoy had his way.
Lisbon played for time. In London, the new prime minister, Henry Addington, advised Portugal to come to terms with France even if it meant closing its ports, and the British troops stationed in Lisbon had been going home since November 1800. Charles IV declared war by a royal decree dated at Aranjuez on 27 February 1801, the date Luis Alfonso Limpo Píriz and Francisco Pereira Galego give. Godoy's own narrative, followed by António Pedro Vicente, says the 28th.
Eighteen days in the Alentejo
Godoy put Spain's strength at 60,000 men. Twenty thousand waited in Galicia, facing northern Portugal, and 10,000 at Ayamonte, facing the Algarve. He led the main army of 30,000 in Extremadura himself. A French auxiliary corps under General Leclerc was on its way, but Godoy wanted the campaign to be Spanish and opened it before the French arrived. They never crossed into Portugal.
Spanish forces against Portugal in May 1801, by front
men
Godoy's own figures, from his memoirs: 60,000 men in all, counting the grenadier and light companies of the provincial militia. Only the Extremadura army invaded; Godoy says the Galician army stayed put unless it was needed. Francisco Pereira Galego estimates the force that entered the Alentejo at 40,000 to 50,000.
Show the data
| Men | |
|---|---|
| Extremadura (Godoy) | 30,000 |
| Galicia (San Simón) | 20,000 |
| Ayamonte (Iturrigaray) | 10,000 |
The Portuguese were far weaker. Galego puts the army that faced Godoy at about 12,000 men, badly organised, poorly trained and poorly equipped. The commander-in-chief, the Duke of Lafões, was in his eighties and left the running of operations to the Scottish general John Forbes Skellater, who had led Portugal's troops in the war against France.
Olivença was the weak point. It stood on the left, Spanish-facing bank of the Guadiana, and its only bridge to the rest of Portugal, built under King Manuel I, had been blown up in 1709 in the War of the Spanish Succession. The foreign officers hired to plan Portugal's defence in the late eighteenth century had all advised giving the town up as too costly to hold. Godoy noted that its nine bastions had been repaired but not its outworks; a fortnight later, he thought, it could have put up a fight.

Elvas refused to surrender. Campo Maior, a few kilometres to the north, was besieged from 21 May by the fourth division under Francisco Xavier Negrete. Its governor was a military engineer, Matias José Dias Azedo, who had come to see to the fortifications and ended up defending them. Lucien Bonaparte, Napoleon's brother and French ambassador in Madrid, came to watch the siege lines being laid out from a hill outside the town.
Lafões drew up his field army behind Arronches and along the road to Portalegre. Godoy wrote that by the 28th he had heard of a general Portuguese attack planned for the 30th, and struck first. The garrison of Arronches, nearly 2,000 veterans, came out to fight in the open and was broken. About 300 Portuguese were killed or wounded and almost as many captured. Alegrete and Portalegre were occupied, and the headquarters' tents, stores and pay chest were taken within hours.
The Portuguese army came apart. Lafões fell back to Gavião with about 12,000 men, and desertion, in Godoy's word, was “immense”. On 4 June Spanish troops took the army's main depots at Flor da Rosa, near Crato, and Lafões withdrew across the Tagus towards Abrantes. Teresa Fonseca lists fifteen places the Spanish occupied, from São Vicente and Barbacena to Portalegre, Castelo de Vide, Nisa and Crato.
Campo Maior held out for fifteen or sixteen days and surrendered on 6 June, as did the little fortress of Ouguela. The Spanish had no proper siege train, so they pounded the town from makeshift batteries. Godoy counted 5,076 balls fired by his ten 24-pounders alone, and wrote that the Portuguese fired back about half as much. No breach was opened, but by his account the parapets facing his guns were destroyed and many houses ruined.
Late January
Franco-Spanish convention
France and Spain agree the ultimatum to Portugal.
27 February
Spain declares war
The royal decree is dated the 27th; Godoy's narrative and Vicente give the 28th.
26 April
Portugal's manifesto
The Prince Regent publishes his reply to Spain.
20 May
Invasion
Olivença and Juromenha capitulate; oranges are cut in the ditches of Elvas. Galego gives 15 May for the invasion, Vieira 21 May.
21 May
Siege of Campo Maior
Negrete's division closes round the town.
Late May
Arronches
Godoy attacks first and scatters the Portuguese field army.
4 June
Flor da Rosa
The army's main depots fall; Lafões retreats over the Tagus.
6 June
Peace dated at Badajoz
Campo Maior and Ouguela surrender the same day.
16 June
Ratifications exchanged
The Spanish–Portuguese treaty comes into force.
29 September
Treaty of Madrid
Portugal signs a harsher peace with France.
Two treaties signed at Badajoz
Portugal asked for peace before Godoy could cross the Tagus. Its negotiator was Luís Pinto de Sousa Coutinho, the Prince Regent's secretary of state for home affairs and a lieutenant general. He met Godoy and Lucien Bonaparte at Badajoz. At Godoy's suggestion they wrote two treaties, one with Spain and one with France, declared to be “in their essential part no more than one”: if any article of either was broken, both fell.

| Article | Terms |
|---|---|
| I | Peace on land and sea; ships taken after ratification to be returned |
| II | The Prince Regent closes the ports of all his dominions to British ships |
| III | Spain returns Juromenha, Arronches, Portalegre, Castelo de Vide, Barbacena, Campo Maior and Ouguela, with their guns and stores, and keeps Olivença and its territory, the Guadiana becoming the border there |
| IV | No depots of contraband on Portugal's side of the border; a breach of this or any other article voids the treaty between the three powers |
| V | Portugal compensates Spanish subjects for losses caused by British or Portuguese ships; Spain does the same for illegal Spanish captures |
| VI | Within three months Portugal repays costs its troops left unpaid when they withdrew from the war against France |
| VII | Hostilities stop within 20 hours of signing; Spanish troops leave within six days of ratification |
| VIII | Prisoners freed within 15 days of ratification |
| IX | Spain guarantees all Portugal's states and dominions without exception |
| X | The old defensive alliance between the two crowns is to be renewed |
| XI | Ratification within ten days |
Summarised from the Portuguese text printed by Borges de Castro and the Spanish text. Article VI refers to the joint campaigns of 1793 to 1795.
“His said Majesty shall keep, as a conquest, to unite it for ever to his dominions and vassals, the fortress of Olivença, its territory and people from the Guadiana; so that this river shall be the limit of the respective kingdoms in that part which touches only the said territory of Olivença.”
The French treaty, signed by Lucien Bonaparte, shut Portugal's ports to all British warships and merchantmen until France and Britain made peace, opened them to France and its allies, and let French cloth in on the best terms. In South America it moved the border with French Guiana to the Arawari river. Secret conditions signed the same day added the money: 15 million livres tournois, half in coin and half in precious stones, paid in Madrid at a million a month.
One secret clause showed what worried the negotiators. If António de Araújo, a Portuguese envoy who had gone to France to deal with the First Consul directly, had concluded a treaty in Paris, or even been received and allowed to negotiate, everything signed at Badajoz was void. Vicente argues that Lucien hurried the talks because he knew of Araújo's journey.
Napoleon's fury and the Treaty of Madrid
Napoleon had counted on Portuguese territory to bargain with in his talks with Britain, and the Badajoz terms left him none. He told Lucien that affairs of this importance “are not children's games” and wrote in fury to Talleyrand.
“This treaty is an unexpected blow, which the First Consul regards as one of the most striking reverses he has suffered in his office… For the honour of this government I would rather have lost a province than ratify this treaty.”

Godoy had expected trouble. He wrote that he drafted Article IX, Spain's guarantee of all Portugal's dominions, partly to stop the French invading Portugal on their own if Bonaparte rejected his brother's treaty. Spain's treaty stood. France's did not: Napoleon refused to ratify it, and Portugal was made to sign a new one.
The Treaty of Madrid was signed on 29 September 1801 by Cipriano Ribeiro Freire for Portugal and, again, Lucien Bonaparte. Portugal's European ports were to stay closed to the British. The Guiana border was pulled south from the Arawari to the Carapanatuba, a river entering the Amazon above Fort Macapá. An additional article raised the indemnity to 20 million livres tournois, payable within twelve months.
What Portugal agreed to pay France in 1801
million livres tournois
From the secret conditions of the Franco-Portuguese treaty of Badajoz (15 million, half in coin and half in precious stones, in 15 monthly payments of one million) and the additional article of the Treaty of Madrid (20 million, in coin, jewels or bills, all within twelve months).
Show the data
| Indemnity | |
|---|---|
| Badajoz, 6 June (not ratified) | 15 |
| Madrid, 29 September | 20 |
The occupation dragged on after the shooting stopped. Spanish troops did not leave Campo Maior until 22 November 1801. The French corps in Spain, which had never fought, began marching home in early December. At the Peace of Amiens in March 1802, Britain and France put the Guiana border back on the Arawari.
Olivença changes hands
- Area ceded
- About 430 to 450 square kilometres on the left bank of the Guadiana
- Households in 1800
- About 2,160 in the town and its five villages (José Cornide)
- Population in 1801
- About 7,000 people, by a census of that year
- New diocese
- Detached from Elvas and joined to Badajoz by a papal brief of 1802
José Cornide, a scholar from A Coruña who was spying on Portugal for Spain, visited Olivença on 2 and 3 August 1800 and counted about 2,160 households in the town and its villages; his parish figures, as Heliodoro Núñez López reproduces them, add up to 2,151. His count included the 55 of Villarreal, which belonged to Juromenha rather than Olivença. A census of 1801 gave about 7,000 souls. In October 1802 a papal brief took the parishes out of the Portuguese diocese of Elvas and gave them to Badajoz.
Godoy called the town a key to the frontier and a barrier to smuggling. Charles IV wanted to make Olivença a duchy for him; Godoy says he talked the king out of it, and accepted two flags that a royal decree of 1 July let him add to his coat of arms. Eleven captured Portuguese flags were sent to Madrid.

In South America the war went the other way. Luso-Brazilian forces overran the Sete Povos, seven former Jesuit mission towns east of the Uruguay river, and the Badajoz treaty said nothing about America. Limpo Píriz, of Olivenza's municipal archive, sets the roughly 450 square kilometres Portugal lost in Europe against some 90,000 it gained in Brazil, an area about the size of Portugal itself.
When Spain demanded the missions back in 1802, Lisbon answered with a counter-claim: Villarreal, a hamlet on the left bank that Limpo Píriz puts at fewer than 30 hearths and that belonged to Juromenha, one of the towns Spain had agreed to return. Spain's demands got nowhere, and the Sete Povos stayed in Portuguese hands and later in Brazil.
Why it still matters
The peace bought six uneasy years. France kept pressing Portugal to close its ports to Britain, and Lisbon kept failing to do it. In October 1807 Godoy agreed with Napoleon at Fontainebleau to carve Portugal up, and a French army under Junot crossed the border in November. Some Portuguese historians, António Pedro Vicente among them, count 1801 as the first of the invasions of the Peninsular War; Galego prefers to call it an incursion.
On 1 May 1808, in a manifesto from Rio de Janeiro breaking with France, the Prince Regent declared “null and of no force” the treaties Napoleon had compelled him to sign, “particularly those of Badajoz and Madrid of 1801”. Portugal's case has rested since on Spain's part in the invasion of 1807, because the treaty itself said that a breach of any article annulled it.
In Article 105 of the Final Act of the Congress of Vienna, in 1815, the other powers recognised the justice of Portugal's claim and undertook to use their most effective conciliatory efforts to have Olivença returned. Spain acceded to that act in 1817 without ever handing the town back.
Portugal has never accepted the loss since. The border between the mouth of the Caia and the Cuncos stream has still not been marked, and in September 2024 the defence minister, Nuno Melo, said Olivença “is Portuguese”. Spain treats the 1801 treaty as valid.

FAQs
Why is it called the War of the Oranges?
On 20 May 1801 Spanish light infantry cut two branches of oranges in the ditches of Elvas while under fire from the fortress. Manuel Godoy, the Spanish commander, sent them to Queen María Luisa. He wrote in his memoirs that the gift drew many epigrams. The war has been named after oranges ever since, although Godoy never says outright that his gift was the origin.
What did Portugal give up at Badajoz?
Under the treaty with Spain it lost Olivença and its territory on the left bank of the Guadiana, promised to close its ports to British ships and to repay old war costs. Under the separate treaty with France it agreed to pay 15 million livres tournois and to move its border in Guiana. Spain returned every other town it had taken.
Why did Portugal sign a second treaty with France?
Napoleon refused to ratify the treaty his brother Lucien had signed at Badajoz, calling it one of the worst reverses of his time in office. Portugal signed a harsher one in Madrid on 29 September 1801, with an indemnity of 20 million livres tournois and a Guiana border further south.
Does Portugal still claim Olivença?
Yes. The Prince Regent declared the treaty void in 1808, the powers at the Congress of Vienna recognised the justice of its claim in 1815 and undertook to seek the town's return by conciliation, and Portugal has never recognised Spanish sovereignty. The border there has never been marked, though Lisbon rarely presses the point.
On the timeline
Open the timelineNearby moments from earthquake and enlightenment (1750–1807).
António Luís de Seabra is born at sea, aboard the ship 'Santa Cruz' off Cape Verde on its way to Rio de Janeiro. A judge, minister and rector of Coimbra University, he wrote Portugal's first Civil Code, approved in 1867 — the 'Código de Seabra', which governed private life in the country for a full century.
Almeida Garrett is born in Porto. Poet, playwright, novelist, journalist and liberal politician, he is regarded as the greatest figure of Portuguese Romanticism, author of 'Viagens na Minha Terra' and the drama 'Frei Luís de Sousa'.
Spanish forces under Manuel de Godoy invade the Alentejo (the date Godoy gives; other accounts say 15 or 21 May), beginning the brief War of the Oranges. Godoy sends orange branches from Elvas to the Spanish queen, giving the war its name; the Treaty of Badajoz in June forces Portugal to cede Olivenza to Spain — a dispute unresolved to this day.
The Treaty of Badajoz (1801)
The Treaty of Badajoz, dated this day, ends the brief War of the Oranges between Portugal and Spain. Portugal cedes the border town of Olivença, a loss it repudiated in 1808 and has never accepted since, and which remains a small but enduring point of friction with Madrid.
Portugal signs the Treaty of Madrid with Napoleonic France, closing its ports to British shipping, paying an indemnity of 20 million livres tournois and ceding territory in northern Brazil, in the aftermath of the War of the Oranges.
Miguel, the future absolutist king who would seize the throne from his niece Maria II and fight the Liberal Wars of 1832–34, is born at the Palace of Queluz, son of João VI and Carlota Joaquina.
Colonel António Teixeira Rebelo founds the Colégio Militar, a military boarding school, at a fort in Oeiras (the school's date; accounts from 1903 say 2 March). It moved to Luz, in Lisbon, in 1814; its standard carries the Tower and Sword among many decorations, and it admitted its first girls only in 2013.
Coming up in history
All long reads
8 June 2022Paula Rego, the Lisbon-born painter of hard stories, dies at 87
9 June 1815Olivença and Article 105: Portugal at the Congress of Vienna, 1815
10 June 1580Camões dies in Lisbon: the poet whose death became Portugal's day
11 June 1557The death of João III, 11 June 1557: a king who outlived all his children
13 sources
Archives, scholarship and reporting this article was checked against.
- 1
Collecção dos tratados, convenções, contratos e actos publicos celebrados entre a coroa de Portugal e as mais potencias, vol. IV (José Ferreira Borges de Castro)Imprensa Nacional, Lisbon, 1856 (Internet Archive scan, University of Toronto copy)
- 2
Cuenta dada de su vida política por Don Manuel Godoy, Príncipe de la Paz, ó sean Memorias críticas y apologéticas para la historia del reinado del Señor D. Carlos IV, vol. IIIImprenta de I. Sancha, Madrid, 1836 (Internet Archive scan)
- 3
A política de Godoy em relação a Portugal do Tratado de Basileia à invasão de Junot (António Pedro Vicente); Proyección americana de la Guerra de las Naranjas y Tratado de Badajoz (Luis Alfonso Limpo Píriz)Revista de Estudios Extremeños, vol. LVII, no. 3 (2001), Diputación de Badajoz
- 4
O Alentejo na Guerra Peninsular (Teresa Fonseca)O Pelourinho: Boletín de Relaciones Transfronterizas, no. 15 (2011), pp. 141–154
- 5
Olivença, filha da Espanha e neta de Portugal (Petra Svobodová)Romanica Olomucensia 28.1 (2016), pp. 93–105, Palacký University Olomouc
- 6
A praça militar de Campo Maior na Guerra Peninsular (Francisco Pereira Galego)O Pelourinho: Boletín de Relaciones Transfronterizas, no. 15 (2011), pp. 163–172
- 7
Campo Maior: a revolução patriótica de 1808 e a repressão política de 1824–1834 (Rui Rosado Vieira)Revista de Estudios Extremeños, vol. LXXIII, no. 3 (2017), pp. 2685–2736
- 8
Prelúdio das invasões francesas: o planeamento da invasão espanhola de 1801 (António Ventura)Revista de Estudios Extremeños, vol. LXXI, no. 1 (2015), pp. 413–436
- 9
Tratado de paz y amistad entre las coronas de España y Portugal; firmado en Badajoz el 6 de junio de 1801Wikisource (Spanish), transcription of the Spanish text
- 10
Efectos demográficos de la Guerra de la Independencia en Olivenza (Heliodoro Núñez López)Revista de Estudios Extremeños, vol. LXVII, no. 1 (2011), pp. 263–322
- 11
Traité de Vienne (1815), articles 105 à 107Wikisource (transcription of the French text of the Final Act)
- 12
Pedro Gómez Labrador, Marquis of Labradorerc-secure-db, Utrecht University
- 13Nuno Melo defende que Olivença “é portuguesa”Observador (Lusa)
Image credits
- Manuel Godoy as general, painted by Francisco Goya in 1801, the year of the campaign. A flag with the Portuguese royal arms hangs at the left. The painting belongs to the Real Academia de Bellas Artes de San Fernando in Madrid. Francisco Goya, Public domain, via Wikimedia Commons.
- The ruined Ajuda bridge over the Guadiana between Elvas and Olivença, photographed in 2008. Its destruction in 1709 left Olivença cut off from the rest of Portugal by the river. Tagido, Public domain, via Wikimedia Commons.
- Luís Pinto de Sousa Coutinho, who signed both Badajoz treaties for Portugal, in Francesco Bartolozzi's engraving of 1797 after a portrait by Domingos Sequeira. Francesco Bartolozzi / Domingos Sequeira, Public domain, via Wikimedia Commons.
- Lucien Bonaparte, Napoleon's brother and French ambassador in Madrid, who signed both the Badajoz and Madrid treaties for France. Portrait from the workshop of François-Xavier Fabre, after 1800. Workshop of François-Xavier Fabre, Public domain, via Wikimedia Commons.
- Olivença, Olivenza in Spanish, seen from its castle in 2009. Axel Cotón Gutiérrez, CC BY-SA 4.0, via Wikimedia Commons.
- A bastion of the walls of Elvas, photographed in 2008. Elvas was blockaded in 1801 but never taken. Alessandro Bonvini, CC BY 2.0, via Wikimedia Commons.

