Long unchallenged, Pakistan's top spy agency faces a flurry of court actions that subject its darkest operations to unusual scrutiny, amid growing calls for new restrictions on its largely untrammeled powers.
The cases against the agency, the Inter-Services Intelligence Directorate, have uncertain chances of success, analysts say, and few believe that they can immediately hobble it.
But they do represent a rare challenge to a feared institution that is a cornerstone of military supremacy in Pakistan.
In the first case, due for a hearing on Wednesday, the Supreme Court has ordered the ISI to produce in court seven suspected militants it has been holding since 2010 - and to explain how four other detainees from the same group died in mysterious circumstances over the past six months.
The second challenge, due for a hearing on February 29, revives a long-dormant vote-rigging scandal, which focuses on illegal donations of $6.5 million as part of a covert, and ultimately successful, operation to influence the 1990 election.
The cases go to the heart of the powers that have given the ISI such an ominous reputation among Pakistanis: its ability to detain civilians at will, and its freedom to meddle in electoral politics.
They come at the end of a difficult 12 months for the spy service, which has faced sharp criticism over the killing of Osama Bin Laden by American commandos inside Pakistan and, in recent weeks, its role in a murky political scandal that stoked rumours of a military coup.
Now its authority is being challenged from an unexpected quarter: chief justice, Iftikhar Muhammad Chaudhry. Only weeks ago, Justice Chaudhry, an idiosyncratic judge, faced accusations of being soft on the military when he inserted the courts into a bruising battle between the government and army.