 For two consecutive terms from August 28, 1831 to March 3, 1838 he was chief of state of the State of Guatemala, within the Federal Republic of Central America.Born in the 1790s (some historians give the date August 29, 1790, others May 26, 1794), Gálvez was a foundling left in a basket at the house of Fray Toribio Carvajal.Carvajal gave the child in adoption to the family of Gertrudis Gálvez, one of the wealthiest families of the time, and he received their name.