At first glance, the fall of Bolivia’s president, Evo Morales, this month may appear to be a victory for democracy. After all, his populist government had grown increasingly undemocratic. Having already served three terms, Mr. Morales called a referendum in 2016 seeking to eliminate the Constitution’s term limits. When Bolivians voted the proposal down, the Constitutional Court, packed with Morales loyalists, allowed him to run anyway — on the absurd ground that term limits violated his “human right” to run for office.

In October, Mr. Morales “won” a fourth term in an election that an Organization of American States report says was marred by vote tampering. Widespread protest and a police mutiny erupted, opposition leaders called on the armed forces to dislodge Mr. Morales and army leaders “suggested” that he resign. Mr. Morales fled to Mexico, and an opposition senator, Jeanine Áñez, assumed the presidency. In effect, Mr. Morales fell prey to a coup.

Many Bolivians sought Mr. Morales’s departure. But he quit only after the police rebelled and the army chief called for his resignation — a call made after he had conceded to new elections under new electoral authorities, which offered a plausible way out of the crisis without military intervention.

The coup highlights an alarming development in Latin America: Ignoring the tragic lessons of the region’s praetorian past, many politicians are turning to the armed forces to resolve crises and even remove governments.