Pakistani militants have attacked a court complex in the city of Peshawar, killing at least three people and injuring two dozen.

A senior government official said the militants attacked the complex this morning and the group included at least one suicide bomber, who detonated his explosives.

Mian Iftikhar Hussain, information minister in the nearby Khyber Pakhtunkhwa province, said a gun battle is currently taking place at the complex.

He said he believes the attackers may have been trying to free some of their colleagues who are jailed on the premises.

Initial information suggests the militants have taken a number of people hostage.

Mohammad Arshad Khan, a local police officer, said a female judge is one of the people who wounded in the attack.

Attacks against authorities in the north western region of Pakistan are not uncommon and several people were killed in attacks last week.

A suicide bomber blew himself up near a police van in Peshawar, killing at least two people.

Police officer Zaheer Khan said 10 more people were wounded and reports suggested the attacker was on foot.

While no one claimed responsibility for the attack, the Pakistani Taliban were suspected.

A bomb disposal expert was also killed while defusing an explosive device in Peshawar last week.

Another solider was stoned to death on the hood of a car by tribesman in Parachinar, the capital of the Kurram tribal area in north west Pakistan. The soldier was killed or allegedly having a relationship with a local woman.