War of the Oranges
Portugal does not recognise Spanish sovereignty over the territory, based on its interpretation of the rulings of the 1815 Congress of Vienna. Spain accepted the Treaty on 7 May 1817; however, Olivença and its surroundings were never returned to Portuguese control and this question remains unresolved and Portugal holds a claim over it. Olivenza was under Portuguese sovereignty from 1297. During the War of the Oranges, French and Spanish troops, under the command of Manuel de Godoy, took the town on May 20, 1801. In the aftermath of that conflict, the Treaty of Badajoz was signed, with the Olivenza territory remaining a part of Spain.