The punishment inflicted on former President Pervez Musharraf shows how quickly Pakistan's democratic institutions, most notably an independent judiciary and free Press, have matured over the past five years, an article in a major US newspaper said.

"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," Sadanand Dhume, a Washington-based Indian author and journalist, wrote in Wednesday's Wall Street Journal.

"Pervez Musharraf's recent legal setbacks are Pakistan's gain," he said, while chiding the US for backing a military leader.

"A two-week house arrest is far from the welcome 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," Dhume wrote.

"In addition to serving as a case study in political delusion, 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 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 Musharraf to power.

"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 US, 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, Musharraf won Western aid by vowing to fight terrorism and clothing himself as a moderniser 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, Musharraf laid the groundwork for much of the violence that roils Pakistan—and Afghanistan—today.

"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 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 per cent share of the national budget and calls 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 the confrontation with its neighbours and toward development for its citizens. House arrest for a once General is one large step in this direction."