People lived at the mouth of the Douro long before Rome. Finds go back to the 8th century BC, perhaps a Phoenician trading post, and the Celtic Gallaeci held the region before the conquest. Under Rome the harbour, Portus Cale, was a trading hub between Lisbon and Braga. Its name is cited as the root of the word Portugal.
Muslim forces took the town around 715, and Alfonso I of Asturias won it back in 741. In 868 the Galician noble Vímara Peres was granted the land between the Minho and the Douro, and his County of Portucale grew into Portugal. In 1387 the city hosted the wedding of John I and Philippa of Lancaster. That marriage sealed the alliance with England that still exists, and the English connection runs right through Porto's later story.
By the 1400s Porto was a shipbuilding town. Prince Henry the Navigator launched the 1415 attack on Ceuta from here, the opening move of Portugal's age of overseas expansion. The city fed the fleet and was left with tripe, which is why its people are still called tripeiros.
Wine had come down the Douro on flat-bottomed rabelo boats since the 13th century, but the 1703 Methuen Treaty with England tied the two countries' trade closer. English firms were trading in Porto by 1717 and soon dominated the port trade. The Marquis of Pombal answered with a state wine company and drew the boundaries of the Douro region, the first protected wine region in Europe. When the company's buildings were attacked in the 1757 'revolt of the drunkards', the rising was crushed. The same century gave the city Nasoni's Clérigos tower.
The 19th century hit hard. In March 1809, with Soult's French army in the city, crowds fleeing over the Ponte das Barcas, a bridge of boats, brought it down, and about 4,000 people died. Wellington retook Porto soon after by crossing the river in wine barges. The Liberal Revolution started here in 1820, and during the civil war the city held out through an 18-month absolutist siege in 1832 and 1833. That is where the name Cidade Invicta, the unconquered city, comes from.
Gustave Eiffel's Maria Pia Bridge opened in 1877, and the Dom Luís I followed in 1886. Politics stayed restless: Portugal's first republican revolt broke out here on 31 January 1891, and in 1919 monarchists briefly proclaimed a Monarchy of the North with Porto as its capital.
UNESCO listed the historic centre in 1996, and in 2001 Porto shared the European Capital of Culture title with Rotterdam. Tourism grew, helped by a Ryanair hub at the airport, and more than 3 million tourists came in 2025. The boom sits next to a hollowing out: the municipality has lost nearly 100,000 residents since the 1980s, and many of its oldest houses are in danger of falling down.