 In the civil war of 1826, Gálvez took part with the Federalists and headed a revolutionary movement against the Unitarian government, which, though promptly suppressed, hastened the invasion of Guatemala by federalist Francisco Morazán.Gálvez joined Morazán's forces in Ahuachapán.Member of the liberal party, Mariano Gálvez was appointed chief of state in 1831, during a period of turmoil that made governing difficult; after the expulsion of the conservative leader of the Aycinena family and the regular clergy in 1829, was appointed by Francisco Morazán as Governor of Guatemala in 1831.