History of Portugal the Moors in 1249, and in 1255 the capital shifted to Lisbon. Neighboring Spain would not complete its "Reconquista" until 1492, almost 250 years later. Portugal's land boundaries have been notably stable for the rest of the country's history. The border with Spain has remained almost unchanged since the 13th century. The Treaty of Windsor (1386) created an alliance between Portugal and England that remains in effect to this day. Since early times, fishing and overseas commerce have been the main economic activities. During the 15th and 16th centuries, Portugal became a leading European power that ranked with England, France
Portugal I of Portugal signed with the king Fernando IV of Castile (which was represented, when being a minor, by his mother the queen Maria de Molina) the Treaty of Alcañices (1297), which stipulated that Portugal abolished agreed treaties against the kingdom of Castile for supporting the infant Juan de Castilla. This treaty established inter alia the border demarcation between the kingdom of Portugal and the kingdom of Leon, where the disputed town of Olivenza was included. The reigns of Dinis I (Denis I), Afonso IV (Alphons IV), and Pedro I (Peter I) for the most part saw peace with the