In 1803, the Academia Real da Marinha e Comércio (Royal Academy of Navy and Commerce) was created, and lectures took place in buildings that belonged to the Real Colégio dos Órfãos (Royal School for the Orphans); this institution had been created in 1650 by Father Baltazar Guedes in the area of Campo do Olival.
The academy new building, designed by José Costa e Silva and revised by Carlos Amarante included extra constructions to accommodate the Real Colégio dos Órfãos. However, the extended time of construction, together with the need to adapt to constant project alterations ended in a new project, where the previously existing school and church were not included. In 1837 the academy became extinct and the new Academia Politécnica replaced it.
During the Siege of Porto (1832-1833), the building under construction was occupied by the liberals, becoming a campaign hospital, thus shutting classes between 1832 and 1834.
Throughout that time period, the Academia Politécnica (Polytechnic Academy) was transferred to the Palace of the Viscount of Balsemão, located in the neighbouring Carlos Alberto Square, to ensure some of the school activity.