Three people were injured in an explosion in a Pakistan court after the judge asked a police officer to explain how a grenade works.

Instead of simply telling the court how the weapon functions, the constable produced a live grenade and pulled out the pin, resulting in a “loud explosion”.

Pakistan Daily reports the constable and court clerk were among the injured in the blast, which took place in courtroom-III of Karachi’s Anti-Terrorism Court. The men were taken to a nearby hospital for first aid, but are expected to recover.

The explosion prompted police and paramilitary forces to surround the court, fearing a terrorist attack, and the country’s security forces were put on high alert.

The officer, from the Sindh Police Department’s Kalakot station, had been holding a grenade from a weapons stash allegedly belonging to the defendant. Usually such devices are deactivated before being taken into court, but an administrative error resulted in live weapons being used as evidence.

Authorities say the police officer will be severely punished once he recovers from his injuries.