On 9 July 1832, the Liberal army entered Porto the day after the landing of Mindelo and found the city abandoned by the Royalist troops, whose leaders, ignoring the exact number of Liberal forces, had decided to withdraw.
General Manuel Gregório de Sousa Pereira de Sampaio, a first degree viscount of Santa Marta and supreme commander of the division that operated between the Royalists Coimbra and Vila do Conde, decided to settle in Vila Nova de Gaia.