Portugal claims "de jure" sovereignty over Olivenza on the grounds of the cancellation of the Treaty of Badajoz, since it was revoked by its own terms. The breach of any of its articles would lead to its cancellation, and that happened when Spain invaded Portugal in the Peninsular War of 1807. Portugal further bases its case on Article 105 of the Treaty of Vienna of 1815 (which Spain signed in 1817) that states that the winning countries are ""committed to employ the mightiest conciliatory effort to return Olivenza to Portuguese authority"" and that the winning countries ""recognize that the return of Olivenza and its territories must be done"". Thus, the border between the two countries in the region of Olivenza should be demarcated by the Treaty of Alcanizes of 1297.