"Nearly half of dictatorships start as a military coup, though others have been started by foreign intervention, elected officials ending competitive elections, insurgent takeovers, popular uprisings by citizens, or legal maneuvering by autocratic elites to take power within their government. Between 1946 and 2010, 42% of dictatorships began by overthrowing a different dictatorship, and 26% began after achieving independence from a foreign government. Many others developed following a period of warlordism." [1]
[1] https://en.m.wikipedia.org/wiki/Dictatorship (see "Formation")