The Convention of Gramido was an agreement signed on 29 June 1847, in Casa Branca on the town square of Gramido, in Valbom, Gondomar, Portugal, to end the civil war of the Septembrists against the Cartistas known as the Patuleia. The Convention was signed by the commanders of the Spanish and British military forces that had entered Portugal on behalf of the , the representative of the Portuguese government in Lisbon, and the representatives of the Junta in Porto. It sealed the defeat of the Septembrists.
Tenente General D. Manoel de la Concha, Conde de Cancellada, e o Coronel Buenaga como representantes da Espanha, o Coronel Wilde como representante da Grã-Bretanha, o Marquês de Loulé, par do reino, e o General César de Vasconcelos, como representantes da Junta Provisória, reunidos em Gramido com o fim de concertar as necessárias medidas para dar pacífico cumprimento às resoluções das Potências Aliadas, concordaram em que a cidade do Porto se submeteria à obediência do Governo de Sua Majestade Fidelíssima [a Rainha de Portugal] com as condições estabelecidas nos 8 artigos que vão escritos no fim da acta. (...)
The civil war that so frightened queen Maria II was thus ended and, despite talking in reconciliatory terms, the queen and the other leaders of the winning side remained truly resentful against the defeated Septembrists, not alway showing them the clemency they could justly expect. As a result of that attitude, the defeated were hunted down which created a new climate of instability that would inevitably lead to new revolt. This revolt broke out in 1851, and that would become known as the "Regeneração" (Regeneration).
The revolution of the Maria da Fonte was one of the outstanding episodes of the political history of Portugal in the 19th century. Among the many famous men in that movement who would afterwards become very popular, the two brothers Passos (José da Silva Passos and Manuel da Silva Passos), Rodrigo da Fonseca Magalhães, José Estêvão Coelho de Magalhães, Manuel de Jesus Coelho and others. These figures would mark the political history of Portugal later in the nineteenth century.