At least four people were killed and 25 wounded in a terrorist attack on a court in the northern Afghan province of Balkh on Thursday, official sources said.

"Five to six terrorists armed with suicide vests and rifles stormed the provincial attorney’s office in provincial capital Mazar-i-Sharif. They killed the policeman guarding the compound before entering the buildings at around 11:30 a.m. Sporadic gunfire was still going on in the evening," a security source told Xinhua news agency.

Those killed were a district police chief, a city judge and two policemen, the source said, adding that "the number of casualties might go up".

About 25 officials and civilians, including women and children, sustained injuries and were shifted to hospitals in the relatively peaceful city, 305 km north of Afghanistan’s capital Kabul.

Many of those wounded are in critical condition.

The attackers were disguised in military uniforms. Many officials and visitors were rescued by the security forces.

Unconfirmed reports said that a few people were taken hostage by the attackers.

Two explosions took place and one of the buildings in the compound caught fire, the source noted.

Atta Mohammad Noor, the acting provincial governor, has strongly condemned the incident, for which no group has claimed responsibility yet.