I wouldn’t want to make an invidious comparison, but I think of how Hitler came into ever greater power (via democratic election and joining his party into an alliance with conservative parties), and then, when he became chancellor, how he could only be dislodged after that by force.
Illiberal democracy and democracy that is quite obviously heading toward authoritarianism or totalitarianism sometimes has to be saved from itself. If a leader like Chavez in Venezuela, Putin in Russia, or Erdogan in Turkey has weakened checks and balances on the exercises of power in such a way that they cannot be plausibly resisted or dislodged peacefully or lawfully, it may be quite appropriate for the military to arrest power from one of these sorts of very, very dangerous alpha males.
Erdogan, for instance, has been going after press freedom recently, strengthening his grip on power in ways that make democracy something that is largely in name only.