Three of the 39 people taken hostage by five prisoners in a jail in Sialkot, Pakistan, were killed in a rescue operation on Friday, police said.
The five prisoners, who also died in the operation, killed the three judges when they tried to shoot their way out of the situation.
Sixteen of those abducted were judicial officials, who were attacked while they were inspecting a section of the prison where women were kept.
The prisoners had demanded a van, arms and safe passage out of jail.