Birth and family Fonseca was born on 5 August 1827 in the city of
Alagoas in the Empire of Brazil. He was the son of Lieutenant Colonel Manuel Mendes da Fonseca and his wife, Rosa Maria Paulina da Fonseca. Simmons notes that the origin of the Fonseca family could possibly be dated back to
Dutch Brazil. Mendes Fonseca is an obscure figure, whose only information comes from
Ministry of War archives. His original surname was Galvão, but took on his mother's surname, Fonseca, instead, likely as the result a family argument. He started off his military career by joining the infantry corps of
Recife on 25 September 1806. His military career spanned four periods of Brazilian politics: The
Viceroyalty of Brazil; the
Kingdom of Brazil; the
first reign of Pedro I; and the
Regency period. He was the military officer in charge of the
province of Alagoas in 1831. During the last days of
Emperor Pedro I's reign, he was promoted to lieutenant colonel, and took charge of the 16th Infantry Battalion. A few years after the emperor's abdication, he was suspected of remaining loyal to Pedro I and lost his military rank. He regained the government's trust in 1836, and took command of Imperial troops during the
revolt of the Cabanada. In 1839, he participated in a failed rebellion against the transfer of the provincial capital from Alagoas (the city) to
Maceió. He was put under trial following his defeat on 13 November, and imprisoned for 6 months until his release on 26 May 1840. The populace of Alagoas elected him to a public office as appreciation for his efforts to prevent Alagoas from being replaced as the provincial capital. His military career ended in 1846, and he retired to private life soon after. Júnior believes that the 1839 revolt was a truamatizing event for young Deodoro, influencing his later indecision in the days leading up to the
Proclamation of the Republic. == Military career ==