Pervez Musharraf's recent legal setbacks are Pakistan's gain. Since Saturday, the country's former military leader has found himself confined by police to a bedroom in his farmhouse on the outskirts of Islamabad. He faces charges ranging from complicity in the assassination of former Prime Minister Benazir Bhutto in 2007 to wrongful dismissal of judges in the waning days of his unpopular rule, which stretched from 1999 to 2008. Meanwhile, his quixotic hope of once again leading Pakistan was dashed after courts rejected his attempt to run for parliament. Pundits don't expect Mr. Musharraf's political party to claim a single seat in elections scheduled for May 11.
A two-week house arrest is far from the welcome Mr. Musharraf expected on his return to Pakistan last month after more than four years of self-exile. In a stream of tweets and Facebook posts, the former commando had painted a picture of a grateful nation waiting to sweep him back to power with a popular mandate.
In addition to serving as a case study in political delusion, Mr. Musharraf's downfall marks a milestone in Pakistan's fledgling democracy. Following on the heels of the first-ever completion of a full term by an elected government, the Musharraf arrest shows that the army's death grip on public life is weakening.
Until now, the idea of a mere judge ordering a former army chief into confinement-even to the relative comfort of his own home-was unthinkable. Such treatment was reserved for elected leaders deposed by the kind of coup that brought Mr. Musharraf to power.
That Mr. Musharraf now faces punishment for his actions shows how quickly the country's democratic institutions, most notably an independent judiciary and free press, have matured over the past five years. An alert media helped the courts by making it harder for Pakistan's generals to intervene on their former boss's behalf without facing public backlash.
Large turnouts at election rallies this year indicate that the average Pakistani feels every bit as entitled to choose his own rulers as the average Indian. Should next month's polls go off as planned, Pakistan will join Turkey, Bangladesh and Indonesia as countries that have defied those who doubt Islam's compatibility with democracy.
For the U.S., the general's arrest should underscore a central lesson of the Musharraf era, that backing military leadership in Islamabad never pays off. In the immediate aftermath of the Sept. 11 terrorist attacks, Mr. Musharraf won Western aid by vowing to fight terrorism and clothing himself as a modernizer in the mold of Turkey's Kemal Ataturk. But this was mostly a public relations ploy. By striking deals with militant groups in Pakistan's remote northwest instead of fighting them, Mr. Musharraf laid the groundwork for much of the violence that roils Pakistan-and Afghanistan-today.
Mr. Musharraf's twin legacies, a virulent Islamist insurgency and a sluggish economy dependent on aid, have unfortunately deepened over the past five years of civilian rule. Violence against religious minorities such as Shia Muslims has skyrocketed. And this year's election has already been marred by terrorist attacks against the non-religious Awami National Party in Khyber Pakhtunkhwa province and the Muttahida Quami Movement in Karachi. The army, for its part, may have retreated from hands-on governance, but it continues to consume a whopping 20% share of the national budget and call the shots on international relations and national security policy.
Nonetheless, bloody and balky progress is still progress. Only when Pakistan's politicians grow confident that they won't be jailed, exiled or executed for crossing the military will they be able to decisively reorient their country away from confrontation with its neighbors and toward development for its citizens. House arrest for a once grandstanding general is one large step in this direction.