List of heads of state and government with a military background

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.

Heads of state and government of unrecognized states
This list includes leaders of countries that were or are self-proclaimed as independent, but were or are neither members nor observers of the United Nations.