Porto (occasionally also known as Oporto in English) is the second-largest city in Portugal, after Lisbon, and one of the major urban areas in Southern Europe and the capital of the second major great urban area in Portugal. Its administrative limits (an area of 41.66 km²/16 sq.mi) include a population of 237,584 (2011) inhabitants distributed within 15 civil parishes. The urban area of Porto, which extends beyond the administrative limits of the city, has a population of 1.3 million (2011) in an area of , making it the second-largest urban area in Portugal. The Porto Metropolitan Area includes an estimated 2 million people. It is recognized as a Gamma- level global city by the Globalization and World Cities (GaWC) Study Group, being one of five cities on the Iberian Peninsula with global city status, (the others being Madrid, Barcelona, Lisbon and Valencia).
Located along the Douro river estuary in northern Portugal, Porto is one of the oldest European centres, and registered as a World Heritage Site by UNESCO in 1996. Its settlement dates back many centuries, when it was an outpost of the Roman Empire. Its Latin name, Portus Cale, has been referred to as the origin for the name "Portugal", based on transliteration and oral evolution from Latin. In Portuguese the name of the city is spelled with a definite article as "o Porto". Consequently, its English name evolved from a misinterpretation of the oral pronunciation and referred to as "Oporto" in modern literature and by many speakers.
One of Portugal's internationally famous exports, port wine, is named for Porto, since the metropolitan area, and in particular the adegas of Vila Nova de Gaia, were responsible for the production and export of the fortified wine. The Porto region is also a major producer of cork.
The history of Porto dates back to the 4th century, to the Roman occupation of the Iberian Peninsula. Celtic and Proto-Celtic ruins have been discovered in several areas, and their occupation has been dated to about 275 BC. During the Roman occupation, the city developed as an important commercial port, primarily in the trade between Olissipona (the modern Lisbon) and Bracara Augusta (the modern Braga).
Porto fell under the control of the Moors during the invasion of the Iberian Peninsula in 711. In 868, Vímara Peres, a Christian warlord from Gallaecia, and a vassal of the King of Asturias, Léon and Galicia, Alfonso III, was sent to reconquer and secure the lands from the Moors. This included the area from the Minho to the Douro River: the settlement of Portus Cale and the area that is today known as Vila Nova de Gaia. Portus Cale, later referred to as Portucale, was the origin for the modern name of Portugal. In 868, Count Vímara Peres established the County of Portugal, or, usually known as Condado Portucalense after reconquering the region north of Douro.
In 1387, Porto was the site of the marriage of John I of Portugal and Philippa of Lancaster, daughter of John of Gaunt; this symbolized a long-standing military alliance between Portugal and England. The Portuguese-English alliance,(see the Treaty of Windsor) is the world's oldest recorded military alliance.
In the 14th and the 15th centuries, Porto's shipyards contributed to the development of Portuguese shipbuilding. It was also from the port of Porto that, in 1415, Prince Henry the Navigator (son of John I of Portugal) embarked on the conquest of the Moorish port of Ceuta, in northern Morocco. This expedition by the King and his fleet, which counted among others Prince Henry, was followed by navigation and exploration along the western coast of Africa, initiating the Portuguese Age of Discovery. The nickname given to the people of Porto began in those days; Portuenses are to this day, colloquially, referred to as tripeiros, referring to this period of history, when higher-quality cuts of meat were shipped from Porto with their sailors, while off-cuts and by-products, such as tripe, were left behind for the citizens of Porto: tripe remains a culturally important dish in modern day Porto.
Wine, produced in the Douro valley, was already in the 13th century transported to Porto in barcos rabelos (flat sailing vessels). In 1703 the Methuen Treaty established the trade relations between Portugal and England. In 1717, a first English trading post was established in Porto. The production of port wine then gradually passed into the hands of a few English firms. To counter this English dominance, Prime Minister Marquis of Pombal established a Portuguese firm receiving the monopoly of the wines from the Douro valley. He demarcated the region for production of port, to ensure the wine's quality; this was the first attempt to control wine quality and production in Europe. The small winegrowers revolted against his strict policies on Shrove Tuesday, burning down the buildings of this firm. The revolt was called Revolta dos Borrachos (revolt of the drunks).
Between 1732 and 1763, Italian architect Nicolau Nasoni designed a baroque church with a tower that would become its architectural and visual icon: the Torre dos Clérigos (English: Clerics Tower). During the 18th and 19th centuries the city became an important industrial centre and saw its size and population increase.
The invasion of the Napoleonic troops in Portugal under Marshal Soult also brought war to the city of Porto. On 29 March 1809, as the population fled from the advancing French troops and tried to cross the river Douro over the Ponte das Barcas (a pontoon bridge), the bridge collapsed under the weight. This event is still remembered by a plate at the Ponte D. Luis I. The French army was rooted out of Porto by Arthur Wellesley, 1st Duke of Wellington, when his Anglo-Portuguese Army crossed the Douro river from the Mosteiro da Serra do Pilar (a former convent) in a brilliant daylight coup de main, using wine barges to transport the troops, so outflanking the French Army.
In 24 August 1820, a liberal revolution occurred, quickly spreading without resistance to the rest of the country. In 1822, a liberal constitution was accepted, partly through the efforts of the liberal assembly of Porto (Junta do Porto). When Miguel I of Portugal took the Portuguese throne in 1828, he rejected this constitution and reigned as an absolutist monarch. A Civil War was then fought from 1828 to 1834 between those supporting Constitutionalism, and those opposed to this change, keen on near-absolutism and led by D. Miguel. Porto rebelled again and had to undergo a siege of eighteen months between 1832 and 1833 by the absolutist army. Porto is also called "Cidade Invicta" (English: Unvanquished City) after successfully resisting the Miguelist siege. After the abdication of King Miguel, the liberal constitution was re-established.
Known as the city of bridges, Porto built its first permanent bridge, the Ponte das Barcas (a pontoon bridge), in 1806. Three years later, it was sabotaged. It was replaced by the , popularised under the name Ponte Pênsil (suspended bridge) and built between 1841–43; only its supporting pylons have remained.
The Ponte D. Maria, a railway bridge, was inaugurated the 4 November of that same year; it was considered a feat of wrought iron engineering and was designed by Gustave Eiffel, notable for his Parisian tower. The later Ponte Dom Luís I replaced the aforementioned Ponte Pênsil. This last bridge was made by Teophile Seyrig, a former partner of Eiffel. Seyrig won a governmental competition that took place in 1879. Building began in 1881 and the bridge was opened to the public on 31 October 1886.
Unrest by Republicans led to the first revolt against the monarchy in Porto on 31 January 1891. This would result ultimately in the overthrow of the monarchy and proclamation of the republic by the 5 October 1910 revolution.
On 19 January 1919, forces favorable to the restoration of the Monarchy launched in Porto a counter-revolution known as Monarchy of the North. During this time, Porto was the capital of the restored kingdom, as the movement was concealed to the north. The monarchy would be deposed less than a month later and no other monarchist revolution in Portugal would happen again.
The historic centre of Porto was declared a World Heritage Site by UNESCO in 1996. The World Heritage site is defined in two concentric zones; the "Protected area", and within it the "Classified area". The Classified area comprises the medieval borough located inside the 14th-century Romanesque wall. Porto is a município (municipality), also known as a concelho.