Militant gunmen and at least one suicide bomber attacked a court complex in north-western Pakistan, killing at least three people and wounding more than two dozen, a government official said.
The attackers may have been trying to free militant colleagues jailed in the compound in the city of Peshawar, said Mian Iftikhar Hussain, the information minister for surrounding Khyber Pakhtunkhwa province.
Security forces waged a gun battle with the militants, and Mr Hussain initially suggested that the attackers may have taken some hostages. He later said the situation was under control, without providing details.
A suicide bomber who was part of the attack detonated his explosives, said Mr Hussain. At least three people were killed and 27 others wounded, he said.
The injured included a female judge, said local police officer Mohammad Arshad Khan. The area has been cordoned off, and elite commandos have been sent in to deal with the attackers, he said.
Local TV footage showed people running for safety. Injured people were being assisted by others to escape. They included a pair of policemen, a lawyer and other civilians, including one man whose clothes had been torn to shreds.
Police commands and army soldiers rushed toward the complex, as the wounded were put on stretchers and taken to hospital.
Peshawar is located on the border of Pakistan's semi-autonomous tribal region, the main sanctuary for Taliban militants who have been waging a bloody insurgency against the government. The militants and their allies have carried out scores of bombings in Peshawar.
No group has yet claimed responsibility for the latest attack.