Portugal is a coastal nation in southwestern Europe, located at the western end of the Iberian Peninsula, bordering Spain (on its northern and eastern frontiers: a total of 1,214 km (754 mi)). Portuguese territory also includes a series of archipelagoes in the Atlantic Ocean (the Azores and Madeira), which are strategic islands along western sea approaches to the Strait of Gibraltar and the Mediterranean Sea. In total, the country occupies an area of 92,090 km2 of which 91,470 km2 is land and 620 km2 water.
Despite these definitions, Portugal's border with Spain remains an unresolved territorial dispute between the two countries. Portugal does not recognize the border between Caia and Cuncos River deltas, since the beginning of the 1801 occupation of Olivenza by Spain. This territory, though under de facto Spanish occupation, remains a de jure part of Portugal, consequently no border is henceforth recognized in this area.
The history of Portugal, a European and an Atlantic nation, dates back to the Early Middle Ages. In the 15th and 16th centuries, it ascended to the status of a world power during Europe's "Age of Discovery" as it built up a vast empire including possessions in South America, Africa, Asia and Australasia (Oceania). Over the following two centuries, Portugal kept most of its colonies but gradually lost much of its wealth and status as the Dutch, English and French took an increasing share of the spice and slave trades (the economic basis of its empire), by surrounding or conquering the widely scattered Portuguese trading posts and territories, leaving it with ever fewer resources to defend its overseas interests.
Signs of military decline began with two disastrous battles: the Battle of Alcácer Quibir in Morocco in 1578 and Spain's abortive attempt to conquer England in 1588 - Portugal was then in a dynastic union with Spain, and contributed ships to the Spanish invasion fleet. The country was further weakened by the destruction of much of its capital city in a 1755 earthquake, occupation during the Napoleonic Wars and the loss of its largest colony, Brazil, in 1822. From the middle of the 19th century to the late 1950s, nearly two-million Portuguese left Europe to live in Brazil and the United States (U.S.).
In 1910, there was a revolution that deposed the monarchy. Amid corruption, repression of the church, and the near bankruptcy of the state, a military coup in 1926 installed a dictatorship that remained until another coup in 1974. The new government instituted sweeping democratic reforms and granted independence to all of Portugal's African colonies in 1975.
Portugal is a founding member of the North Atlantic Treaty Organization (NATO), the Organization for Economic Co-operation and Development (OECD), and the European Free Trade Association (EFTA). It entered the European Community (now the European Union) in 1986.