Pervez Musharraf, who ruled Pakistan for eight years, following his military coup in 1999, has been under house arrest after his bail was cancelled last week. Indeed, one of the three charges against him included terrorism clauses, which is why bail could not be granted to him. This charge has been made in the judges case, in which Musharraf is accused of having subverted the constitution of Pakistan by detaining judges of the Supreme Court, including Chief Justice Iftikhar Chaudhry, in 2007. The two other cases may be equally serious, since he is also accused of involvement in a conspiracy to murder Benazir Bhutto and in the killing of veteran Baloch nationalist, Akbar Khan Bugti, in 2006. Last week, for the first time in Pakistan's history, the judiciary ordered the arrest of a former chief of army staff (COAS).

But the Supreme Court had already shown that it was not prepared to let ex-army men suspected of misdemeanors get away with it. The proceedings against former COAS Mirza Aslam Beg and former ISI chief Asad Durrani are a case in point. Chaudhry reopened their case after 13 years for good reason. In 1996, Beg and Durrani had been accused of distributing large sums of money to Benazir's opponents, including Nawaz Sharif, in order to defeat the PPP in the 1990 elections. But the then chief justice, Syed Sajjad Ali Shah, who had heard the case at the time, was forced to resign after Sharif returned to power in 1997. In February 2012, the Supreme Court reopened the investigation and resumed hearings in court.

But former generals are not the only targets of the Supreme Court, which has also focused its efforts on corruption charges against President Zardari. In 2012, it asked Prime Minister Gilani to write to the Swiss authorities to reopen their investigation into the Zardari-Bhutto bank accounts. Gilani replied that he would do no such thing, as Zardari had presidential immunity. Finally, Gilani was found to be in contempt of court for having disobeyed the Supreme Court order. The speaker of the National Assembly expressed her confidence in the prime minister on behalf of the parliamentary majority, which on July 12 passed a Contempt of Court Act "exempting all government office holders, including the prime minister and all other ministers, from court proceedings under contempt charges". The court struck down this law and forced Gilani to resign.

These developments have been analysed by a number of observers, including the famous lawyer Asma Jahangir, as reflecting a "judicial coup" that undermined the process of democratization. Jahangir said: "we want a strong judiciary, not a powerful one", suggesting that the attitude of the judiciary could lead to a weakening of parliamentary sovereignty. Liberals are especially worried about the growing assertiveness of the judiciary because judges are not uniformly progressive, as is evident from the attitude of some of them vis-a-vis Islamists. The bones of contention between Chaudhry and Musharraf—though Chaudhry had taken oath, in 2000, under Musharraf's PCO—were not only to do with corruption charges and the disappearance of Baloch nationalists. They also included the disappearance of Islamist activists.

More importantly, the affinities of certain lawyers to Islamists came to light in the wake of Salman Taseer's assassination. This PPP veteran, whom the new government had appointed governor of Punjab in 2008, had taken up, in 2010, the defense of Asia Bibi, a Christian woman who had been sentenced to death under the so-called blasphemy law. Islamists harshly criticized the governor for his stance. On January 4, 2011, Taseer was shot dead by one of his bodyguards, Malik Mumtaz Hussain Qadri, who had ties with a Barelvi radical movement. The progressive intelligentsia was all the more stunned as many lawyers called Qadri a hero. It was difficult to find an attorney who would bring the case before the courts, even though the murderer surrendered on the spot. As he came out of the courthouse after his first hearing, some lawyers showered him with rose petals, proclaiming that they were prepared to defend him for no fee.

The judiciary has started to assert itself in Pakistan in 2007, when Chaudhry refused to bow to Musharraf after the latter wanted to dismiss him and when the lawyers' movement took shape in support of the chief justice. The bar association network played a major role here, with local lawyers taking to the streets, braving the risk of being roughed up by the police. Demonstrations spread across the country, from Lahore to Karachi, Quetta, Peshawar, Muzaffarabad. One after the other, regional bar associations invited Chaudhry to speak. The chief justice gave his first address at the Rawalpindi Bar Association in March 2007, speaking on the separation of powers. On May 5, at the invitation of the local bar association, he left for Lahore from Islamabad. The procession, 2,000 vehicles long, took 24 hours to make the trip (six times longer than usual). He was greeted by thousands. On May 12, in Karachi, violence broke out in the wake of an MQM rally held in response to Chaudhry's visit. It claimed at least 40 lives. Each time, the lawyers played a key role in organizing the demonstrations.

When Musharraf went in 2008 and when Chaudhry was restored to his place of honour in 2009—despite Zardari's reluctance and under pressure from Sharif—the lawyers felt they were responsible for the return to democracy. Indeed, their assertiveness has roots in the 2007 movement, in which, unlike the Movement for the Restoration of Democracy in the 1980s, the PPP was only indirectly represented (by lawyers such as Aitzaz Ahsan). And after five years of Zardari, the judiciary still has the upper hand, partly because the political parties have not been true to their task, as is evident from the accusations of corruption against the outgoing prime minister, Raja Pervez Ashraf.

In a way, Pakistan is experiencing a government of judges by default, because the civilians have not appeared to be much better than the military rulers in terms of corruption and nepotism. In a country where 500 families, civilian and military, run the show, the judiciary can easily appear to be the best alternative to this establishment. Especially when it attacks the rich and powerful in the name of what everybody is longing for—justice and anti-Americanism (one of the root causes of the lawyers' opposition to Musharraf in 2007). The judiciary will probably only lose its popularity and its moral superiority when the political class catches the imagination of the people again, if that happens one day, or the moment a more pliable chief justice takes over, something that may happen in a few months, after Iftikhar Chaudhry retires.

This article was originally published in the Indian Express.