Pakistan’s latest ouster of an elected leader looks, at least on the surface, refreshingly democratic.

Nawaz Sharif, the prime minister, was ordered out by the Supreme Court rather than the military, which had cut short his two previous terms. He was removed over corruption charges that are backed up by substantial evidence. Accountability and checks and balances seemed to carry the day.

But where some see democracy’s triumph, others see its corruption as just another tool for the powerful to subvert public will and the rule of law.

The court avoided other officials implicated in the scandal, deepening suspicion that its singling out of Mr. Sharif was opportunistic. The vastly powerful military, whether by luck or design, once again stood to benefit as its rival lost power. Normally timid watchdogs acted under enormous pressure from Mr. Sharif’s rivals.