Four armed militants Saturday attacked a lower court with hand grenades in the port city of Karachi, killing one policeman and getting four of their accomplices freed, Pakistani police said.
"Four attackers hurled hand grenades on policemen who were escorting back to prison four militants after producing them before a judge in the city courts," Iqbal Mehmood, a senior police official, said.
"A police official died on the spot and another was wounded in the attack," he said, adding an attacker was also killed during a gunfight with police.
"The attackers got their four accomplices freed and escaped while firing indiscriminately," Mehmood said.
An AFP photographer witnessed people running helter-skelter as the attackers opened fire at random.
Mehmood said the militants were associated with an outlawed Sunni militant organisation, Jundallah.
Jundallah is accused of carrying out a number of terrorist attacks in the country including a recent attack on a Shiite Muslim procession earlier this year in Karachi, killing 76 people.
Karachi, Pakistan's richest city, has been largely spared Islamist violence but is plagued by crime and particularly kidnappings, which some analysts say bankroll the insurgency in the country's northwest.
Recent riots and a surge in political shootings also sparked fears that the city may again descend into violence.