Yet what brought Mr. Morales down was not his ideology or foreign meddling, as he claimed, but the arrogance of the populist, evident in so many other parts of the world — the claim to be the ultimate arbiter of the will of the people, entitled to crush any institution that stands in his way. And while many in the police and military did eventually join in the protests, and the commander in chief of Bolivia’s military finally called on Mr. Morales to step down, they did so long after the protests began.

Once in power, Mr. Morales had steadily concentrated power in his hands and planted loyalists in key institutions. Nearing the two-term limit for presidents set in the Constitution he himself had helped introduce, he called a referendum that would have allowed him to stay in office indefinitely. When it was defeated, he had the Supreme Court, by now stuffed with his loyalists, rule that limiting his time in office somehow violated his human rights. That cleared a run for re-election last month, but the highly fishy vote on Oct. 20 proved to be the last straw for many Bolivians, who took the streets.

After the Organization of American States declared on Sunday that there was “clear manipulation” of the voting in October, Mr. Morales was left with no choice but to resign, bitterly tweeting from an unknown location that “The world and patriotic Bolivians will repudiate this coup.”

The fall of Mr. Morales comes at a troubled time for many democracies as millions of people from Chile to Hong Kong, mobilized by social media, have taken to the streets against arbitrary rule by governments of left and right. Though many of the uprisings have common sources, ranging from economic stagnation to inequality, rapid social change or a sense of alienation, each outbreak of discontent has its distinct causes and potential outcomes.

The citizens who went into the streets in Bolivia were not seeking to reverse Mr. Morales’s social or economic reforms, from which many of them benefited, but to uphold democratic rules and institutions he tried to subvert.