Portugal (Portuguese pronunciation: [puɾtuˈɣal]), officially the Portuguese Republic (Portuguese: República Portuguesa [ʁɛˈpuβlikɐ puɾtuˈɣezɐ]), is a country located on the Iberian Peninsula, in Southwestern Europe, and whose territory also includes the macaronesian archipelagos of the Azores, Madeira, and the Savage Islands. It features the westernmost point in continental Europe, and its Iberian portion is bordered to the west and south by the Atlantic Ocean and to the north and east by Spain, the sole country to have a land border with Portugal. Its archipelagos form two autonomous regions with their own regional governments. In the mainland, Alentejo region occupies the biggest area but is one of the regions in Europe with a lower population density. Lisbon is the capital and largest city by population, being also the main spot for tourists alongside Porto and Algarve.
One of the oldest countries in Europe, its territory has been continuously settled, invaded and fought over since prehistoric times. The territory was first inhabited by the Celtic and Iberian peoples, such as the Lusitanians, the Gallaecians, the Celtici, Turduli, and the Conii. These peoples had some commercial and cultural contact with Phoenicians, ancient Greeks and Carthaginians. It was later ruled by the Romans, followed by the invasions of Germanic peoples (most prominently, the Suebi and the Visigoths) together with the Alans, and later the Moors, who were eventually expelled during the Reconquista. Founded first as a county within the Kingdom of León in 868, the country officially gained its independence as the Kingdom of Portugal with the Treaty of Zamora in 1143.Portugal made numerous discoveries and maritime explorations outside the Mediterranean and by the 15th and 16th centuries established one of the longest-lived maritime and commercial empires, becoming one of the main economic and political powers of the time. At the end of the 16th century, Portugal suffered a war for the crown succession with Spain, leading to the Iberian Union. The Portuguese Restoration War re-instated the House of Braganza in 1640 after a period of substantial loss to Portugal.By the early 19th century, the accumulative crisis, events such as the 1755 Lisbon earthquake, the country's occupation during the Napoleonic Wars, and the resulting independence of Brazil in 1822 led to a marked decay of Portugal's prior opulence. This was followed by the civil war between liberal constitutionalists and conservative absolutists over royal succession, which lasted from 1828 to 1834. The 1910 revolution deposed Portugal's centuries-old monarchy, and established the democratic but unstable Portuguese First Republic, later being superseded by the Estado Novo (New State) authoritarian regime. Democracy was restored after the Carnation Revolution (1974), ending the Portuguese Colonial War and eventually losing its remaining colonial possessions.
Portugal has left a profound cultural, architectural and linguistic influence across the globe, with a legacy of around 250 million Portuguese speakers around the world. It is a developed country with an advanced economy which holds the 14th largest gold reserve at its national central bank, has the 8th largest proven reserves of lithium, with the weight of exports representing 49% of its GDP in 2022. A member of the United Nations, the European Union, the Schengen Area and the Council of Europe (CoE), Portugal was also one of the founding members of NATO, the eurozone, the OECD, and the Community of Portuguese Language Countries.