Militant gunmen and at least one suicide bomber attacked a court complex in northwestern Pakistan on Monday, killing at least three people and wounding over two dozen, a government official said.

The attackers may have been trying to free militant colleagues jailed on the premises of the compound in the city of Peshawar, said Mian Iftikhar Hussain, the information minister for surrounding Khyber Pakhtunkhwa province.

Security forces waged a gunbattle with the militants, and 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 Hussain. At least three people were killed and 27 others wounded, he said.

The wounded 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, an 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 injured were shifted to stretchers and taken to the hospital.

Peshawar is located on the border of Pakistan’s semiautonomous 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.