quality:correction
19th century

The invasion of the Napoleonic troops in Portugal under Marshal Soult 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, outflanking the French Army.

Influenced by liberal revolutions occurring in Europe, the Liberal Revolution of 1820 started in Porto. The revolutionaries demanded the return of John VI of Portugal, who had transferred the Portuguese Court to the Portuguese colony of Brazil since the French invasions of Portugal, it also demanded a constitutional monarchy to be set up in Portugal. 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 antiliberal, absolutist monarch. A civil war (known as the Liberal Wars) 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 collapsed under the weight of thousands of fugitives from the French invasions during the Peninsular War, causing thousands of deaths. It was replaced by the Ponte D. Maria II, popularised under the name Ponte Pênsil (suspended bridge) and built between 1841 and 1843; only its supporting pylons have remained. The Ponte D. Maria, a railway bridge, was inaugurated on 4 November of 1877; 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.

A higher-learning institution in nautical sciences (Aula de Náutica, 1762) and a stock exchange (Bolsa do Porto, 1834 – 1910) were established in the city, but were discontinued later.

Unrest by Republicans led to the 31 January 1891 revolt in Porto, the first uprising against the Portuguese monarchy. This resulted ultimately in the overthrow of the monarchy and proclamation of the republic by the 5 October 1910 revolution.