A grenade presented as evidence in an anti-terrorism court in the Pakistani port city of Karachi on Monday exploded when the judge asked a policeman to explain how the device worked.
Two people were injured when the grenade went off in the courtroom while a case was being heard against a man accused of being an extortionist and a gangster.
The alleged gangster was accused of using grenades to harass people, and police said they had recovered a stash of grenades when they arrested him.
Defence lawyer Abdul Jabbar Lakho said the explosion occurred when the policeman pulled something out of the grenade.
Senior police official Jamil Ahmed confirmed the incident, saying the part that exploded was the detonator. Police said it was thought the detonator had been defused. The explosives surrounding the detonator had been made harmless, Ahmed said.