D. Pedro IV of Portugal, also known as D. Pedro I of Brazil, was a prominent figure in the Portuguese-Brazilian history of the 19th century. Born in 1798, he played a pivotal role both in Brazil’s independence, and in the political and military struggles that shaped Portugal during the first decades of liberalism. As such, his connection to the city of Porto is profoundly significant and rooted in one of the most turbulent periods in Portuguese history: the Liberal Wars.

The city of Porto stood out as one of the greatest bastions of Portuguese liberalism. When D. Miguel usurped the throne in 1828 and established an absolutist regime, many Portuguese, especially the inhabitants of Porto, rose in resistance. During the conflict, D. Pedro chose Porto as the headquarters of the Liberal forces, where one of the most notable episodes of his connection with the city occurred: the Siege of Porto.

Between July 1832 and August 1833, “Miguelist” troops tried, unsuccessfully, to take the city, which resisted heroically under the command of D. Pedro. The people of Porto suffered immensely during this siege, facing hunger, disease and constant bombings, but they remained loyal to the liberal cause and their king. The spirit of sacrifice and courage demonstrated by the people of Porto during the siege earned them the eternal gratitude of D. Pedro and in recognition he granted the city the title of Invicta (undefeated), which is still proudly used today.

D. Pedro, who died in 1834, made clear in his will that he wishes his heart be kept in the Church of Lapa, in Porto, as a gesture that symbolizes his intimate and lasting connection with the city and its people. To this day, the heart of D. Pedro rests in that church, preserved as a symbol of gratitude and mutual devotion between the king and the city of Porto, and the memory of D. Pedro IV lives on in the monuments, in the streets and in the identity of a city that proudly defended freedom and the constitution.