Judge Gebali said her own direct contacts with the generals began in May last year, after a demonstration by mostly liberal and secular activists demanding a Constitution or at least a bill of rights before elections. “This changed the vision of the military council,” she said. “It had thought that the only popular power in the street was the Muslim Brotherhood.”

It was also around that time, Judge Gebali said, that she began helping the military-led government draft a set of binding constitutional ground rules. The rules protected civil liberties, she said, but also explicitly granted the military autonomy from any oversight, as well as a permanent power to intervene in politics. “The military council accepted it, and agreed to issue a ‘constitutional declaration’ with it,” she said.

But as the military-led government unveiled the rules, known here as the Selmi document, the provisions about the military’s power aroused fierce opposition, culminating in a weeklong street battle with security forces near Tahrir Square that left about 45 people dead.

The planned decree “was thwarted every time by all the noise, the popular mobilization, the ‘million-man marches,’ ” Judge Gebali said, blaming the Islamists even though they were only one part of the protests.

Egyptian jurists now say that the generals effectively planted a booby trap in the parliamentary elections by leaving them vulnerable to judicial negation at any time — if the generals allowed previous precedents to apply.

The elections had “a fatal poison,” Judge Gebali said she warned at the time. “Any reader of the situation would’ve known that this appeal would be the end of the Parliament.” When the elected Parliament sought to take control of the interim government, the generals’ prime minister expressly threatened the lawmakers with judicial dissolution, the speaker of Parliament said at the time.