This is a list of heads of state and government in any country who were military personnel. It does not include people who served in the military as part of mandatory peacetime military service or those who only held rank due to their position in government.
Africa Portrait Name Countries Official position Service Rank in military Notes Mobutu Sese Seko President of the Democratic Republic of the Congo (1965–1971)President of Zaire (1971–1997) 1949–1997 NCOField Marshal (as president) Served in the Congo Crisis and First Congo War. Laurent-Désiré Kabila President of the Democratic Republic of the Congo (1997–2001) Served in the Simba Rebellion and First Congo War. Joseph Kabila President of the Democratic Republic of the Congo (2001–2019) Major-General Samuel Doe Chairman of the People's Redemption Council (1980–1986)President of Liberia (1986–1990) 1969–1985 Master Sergeant Came to power in a coup d'etat. Muammar Gaddafi Leader of Libya (1969–2011) 1961–2011 Colonel Idi Amin President of Uganda (1971–1979) 1946–1979 Major-GeneralField Marshal (self-awarded) Bazilio Olara-Okello President of Uganda (1985) 1950–19711979–1986 Lieutenant-General Served in the 1972 invasion of Uganda, Uganda–Tanzania War, and Ugandan Bush War.Tito Okello President of Uganda (1985–1986) 1940–19711979–1986 General Served in World War II, the 1972 invasion of Uganda, Uganda–Tanzania War, and the Ugandan Bush War. Yoweri Museveni President of Uganda (1986–present) 1971–2004 General (as president) Served in the 1972 invasion of Uganda, Uganda–Tanzania War, Ugandan Bush War, First Congo War, and Second Congo WarPasteur BizimunguPresident of Rwanda (1994–2000)1990–1994Served in the Rwandan Patriotic Front during the Rwandan Civil War. Juvénal Habyarimana President of Rwanda (1973–1994) 1963–1994 Served during the Rwandan Civil War. Paul Kagame President of Rwanda (2000–present) 1979–2000 Served in the Ugandan Bush War. Commanded the Rwandan Patriotic Front during the Rwandan Civil War. Americas
Portrait Name Countries Official position Service Rank in military NotesDeodoro da FonsecaPresident of Brazil (1898–1991)1843–1892Generalissimo Floriano PeixotoPresident of Brazil (1891–1894)1861–1889Field MarshalHermes da FonsecaPresident of Brazil (1910–1914)1871–1906Field MarshalJoão de Deus Mena BarretoMember of the Brazilian Military Junta of 1930Divisional GeneralAugusto Tasso FragosoMember of the Brazilian Military Junta of 1930Army GeneralIsaías de NoronhaMember of the Brazilian Military Junta of 1930Vice Admiral Getúlio Vargas President of Brazil (1930–1945, 1951–1954) 1898–1903 Second Sergeant Eurico Gaspar DutraPresident of Brazil (1946–1951)1922–1974Field MarshalJuscelino KubitschekPresident of Brazil (1956–1961)1931–1933, 1937–1940Lieutenant colonelHumberto de Alencar Castelo BrancoPresident of Brazil (1964–1967)1918–1964Field marshalArtur da Costa e SilvaPresident of Brazil (1967–1969)1921–1969Field marshalAugusto RademakerMember of the Brazilian Military Junta of 1969AlmirantAurélio de Lira TavaresMember of the Brazilian Military Junta of 1969Army GeneralMárcio MeloMember of the Brazilian Military Junta of 1969Marshal of the AirEmílio Garrastazu MédiciPresident of Brazil (1969–1974)1927–1969Army GeneralErnesto GeiselPresident of Brazil (1974–1979)1927–1969Army GeneralJoão FigueiredoPresident of Brazil (1979–1985)1937–1979Army GeneralItamar FrancoPresident of Brazil (1992–1995)Officer candidateJair BolsonaroPresident of Brazil (2019–2022)1973–1988Captain Augusto Pinochet President of Chile (1974–1990)President of the Government Junta of Chile (1973–1981) 1931–1998 Captain General Francisco Morazán Central America HondurasPresident of Central America (1829, 1830–1834, 1835–1839)Head of State of Costa Rica (1842)Head of State of El Salvador (1832, 1839–1840)Head of State of Honduras (1827–1828, 1829, 1830) 1821–1840, 1842 General Served in the First and Second Central American Civil WarsSimón Bolívar ColombiaPresident of Colombia (1819–1830) Protector of the Republic of Bolivia (1825) President of Peru (1823–1824)1810–1830Captain GeneralServed in the Spanish American wars of independence and the Gran Colombia–Peru WarAntónio Pinto Soares Costa RicaHead of State of Costa Rica (1842)GeneralLead Costa Rican republican forces in opposition to the Mexican annexation of Central AmericaTomás Guardia Gutiérrez Costa RicaPresident of Costa Rica (1870–1876) (1877–1882)Division GeneralServed in the Filibuster WarPróspero Fernández Oreamuno Costa RicaPresident of Costa Rica (1882–1885)Division GeneralServed in the Filibuster War. Died of natural causes while at war with Guatemala and Honduras during Barrios' War of ReunificationBernardo Soto Alfaro Costa RicaPresident of Costa Rica (1895–1889)Division GeneralSolidified an alliance with El Salvador, Nicaragua, and Mexico to oppose Guatemala and Honduras during Barrios' War of ReunificationFederico Tinoco Granados Costa RicaPresident of Costa Rica (1917–1919)Brigadier GeneralJuan Bautista Quirós Segura Costa RicaPresdident of Costa Rica (1919)GeneralGerardo MachadoPresident of Cuba (1925–1933)1895–1898Brigadier GeneralServed in the Cuban War of IndependenceFulgencio BatistaPresident of Cuba (1940–1944) (1952–1954) (1955–1959)1921–1933Major GeneralFidel CastroPresident of the Council of State (1976–2008)1953–1959CommanderServed in the Cuban Revolution, the Escambray rebellion and the Bay of Pigs InvasionRaul CastroPresident of the Council of State (2008–2018)1953–1959GeneralServed in the Cuban Revolution, the Escambray rebellion and the Bay of Pigs InvasionRafael TrujilloGeneralissimo of the Dominican Republic (1934–1961) President of the Dominican Republic (1930–1938, 1942–1952)1916–1961Generalissmo Gerardo Barrios President of El Salvador (1858, 1859–1860, 1861–1863) 1828–1863 Captain General Served in the First and Second Central American Civil Wars, Malespín's War, Filibuster War, and War of 1863.Santiago GonzálezPresident of El Salvador (1871–1876)MarshalServed in the War of 1863 Fernando Figueroa President of El Salvador (1885), 1907–1911) General Served in the War of 1863, Barrios' War of Reunification, Totoposte Wars, and the War of 1907. Francisco Menéndez President of El Salvador (1885–1890) ?–1890 General Carlos Ezeta President of El Salvador (1890–1894) 1872–1894 General Served in Barrios' War of Reunification, the Totoposte Wars, and the Revolution of the 44. Rafael Antonio Gutiérrez President of El Salvador (1894–1898) ?–1898 General Served in the Totoposte Wars and the Revolution of the 44. Tomás Regalado President of El Salvador (1898–1903) ?–1906 General Pedro José Escalón President of El Salvador (1903–1907) GeneralMaximiliano Hernández MartínezPresident of El Salvador (1931–1934, 1935–1944)1899–1944GeneralServed in the Third Totoposte War and La Matanza Salvador Castaneda Castro President of El Salvador (1944–1945) 1945–1948 General Served in La Matanza Osmín Aguirre y Salinas President of El Salvador (1944–1945) ?–1945 Colonel Served in the Totoposte Wars and La Matanza. Óscar Osorio President of El Salvador (1950–1956) Lieutenant Colonel José María Lemus President of El Salvador (1956–1960) 1933–1960 Lieutenant Colonel Julio Adalberto Rivera Carballo President of El Salvador (1962–1967) Lieutenant Colonel Fidel Sánchez Hernández President of El Salvador (1967–1972) 1938–? GeneralServed in the Football War Arturo Armando Molina President of El Salvador (1972–1977) Colonel Carlos Humberto Romero President of El Salvador (1977–1979) ?–1979 General Andrés Ignacio Menéndez President of El Salvador (1934–1935, 1944) 1898–1944 General Served in La Matanza Jacobo Árbenz President of Guatemala (1944-1945; 1951–1954) 1932–1954 Colonel David CanabarroPresident of the Juliana Republic (1839)Army GeneralAgustín I of Mexico Spain Mexican EmpirePresident of the Regency of Mexico (1821-1822) Emperor of Mexico (1822-1823)1797–1820 (Spain) 1820–1821 (Mexico)Colonel (Spain) General (Mexico)Initially served the Spanish crown before changing sides during the Mexican War of Independence. Commanded the Imperial Army during the Mexican annexation of Central America and against republican forces during the Casa Mata Plan RevolutionGuadalupe VictoriaMember of the Supreme Executive Power (1823–1824) President of Mexico (1824-1829)1812–1823 1836Division GeneralServed in the Mexican War of Independence and for the republican forces during the Casa Mata Plan RevolutionVicente GuerreroMember of the Supreme Executive Power (1823–1824) President of Mexico (1829)1810–1821Division GeneralServed in the Mexican War of Independence and for the republican forces during the Casa Mata Plan Revolution. Commanded the Mexican Army during several Spanish attempts to re-establish control over MexicoAnastasio Bustamante Spain Mexican EmpirePresident of Mexico (1930–1932) (1937–1939) (1939–1941)1808–1821 (Spain) 1821–1830 (Mexico)Colonel (Spain) General (Mexico)Initially served the Spanish crown before changing sides during the Mexican War of Independence. Served in the Imperial Army of Agustín I during the Casa Mata Plan RevolutionMelchor MúzquizPresident of Mexico (1832)1811–1830Brigadier GeneralServed in the Mexican War of Independence and for the republican forces during the Casa Mata Plan RevolutionManuel Gómez PedrazaSpain Mexican EmpirePresident of Mexico (1832–1833)1810–1821 (Spain) 1821–1838 (Mexico)Brigadier GeneralInitially served the Spanish crown before changing sides during the Mexican War of Independence. Served in the Imperial Army of Agustín I during the Casa Mata Plan RevolutionMiguel Barragán SpainPresident of Mexico (1835–1836)1810–1821 (Spain) 1821–1834 (Mexico)Colonel (Spain) Brigadier General (Mexico)Initially served the Spanish crown before changing sides during the Mexican War of Independence. Defeated the last Spanish stronghold in Mexico during the Capture of San Juan de UlúaAntonio López de Santa Anna SpainPresident of Mexico (1833–1835) (1839) (1841–1844) (1847) (1853–1855)1810–1855Captain (Spain) Division General (Mexico)Initially served the Spanish crown before changing sides during the Mexican War of Independence. Served the republican forces during the Casa Mata Plan Revolution. He later served during the Barradas Expedition, the Texas Revolution, the First Franco–Mexican War and the Mexican–American War Nicolás BravoMexicoPresident of Mexico (1839) (1842–1843) (1846)1810–1847Division GeneralServed in the Mexican War of Independence and for the republican forces during The Casa Mata Plan Revolution. He later served during the Mexican–American War Mariano Arista SpainPresident of Mexico (1851–1853)1817–1821 (Spain) 1821–1851 (Mexico)Lieutenant (Spain) Division General (Mexico)Initially served the Spanish crown before changing sides during the Mexican War of Independence. He later served during the First Franco–Mexican war and the Mexican–American WarJuan Almonte Mexico Second Mexican EmpirePresident of the Regency of Mexico (1963–1964)1836–1874Brigadier General Served in the Texas Revolution and the Mexican–American war. Joined the conservative faction during the Reform War and the French-backed Mexican Empire during the Second Franco-Mexican War Maximilian I of MexicoEmpire of Austria Second Mexican EmpireEmperor of Mexico (1864–1867)1854–1864Counter Admiral (Empire of Austria) Porfirio DíazPresident of Mexico (1877–1980) (1884–1911)1848–1876Division GeneralServed in the Revolution of Ayutla, the Reform War and the Second Franco–Mexican WarVictoriano Huerta President of Mexico (1913–1914)1877–19071910–1914Brigadier GeneralServed in the Yaqui Wars, the Caste War of Yucatán and the Mexican RevolutionAlvaro ObregónPresident of Mexico (1920–1924)1912–1920Division GeneralServed in the Mexican Revolution, the Border War and the Rebellion of Agua PrietaPlutarco Elías CallesPresident of Mexico (1924–1928)1911–1920