Marking the anniversary of a government operation against the radical Red Mosque, the attack suggests some militants are growing bolder.
Tens of thousands are pressuring the government to reinstate the judges, who were dismissed under President Musharraf.
Tuesday's deadly US incursion is under investigation, but it points up the contrast between the two nations' approaches to militants along the Afghanistan border.
Political activists and lawyers launched a cross-country march Monday to press for the reinstatement of independent judges fired by Musharraf.
The US is increasingly out of sync with Pakistan's newly-elected government, say analysts.
Top parties missed a joint deadline Wednesday to reinstate judges deposed by President Musharraf.
Parliament is expected to confirm a new prime minister on Monday, further isolating Musharraf.