At least three bomb blasts went off as attackers targeted a court in Pakistan's Khyber Pakhtunkhwa province on Tuesday, local media reported.
Pakistan's Geo TV reported that four people were killed while 12 more injured in the attack which happened in Charsadda district.
The attack involved three militants, one of them detonating explosives at the entrance of the court to pave way for others.
The two others were killed by security forces.
"I escaped towards the canteen and climbed the wall to save my life. But there were many people dead and injured," Mohammad Shah Baz, a resident in the area, told Reuters.
This is the latest in a series of fresh attacks in Pakistan.
Last week, two suicide blasts in Lahore city and Sindh proivnce of Pakistan killed 13 and 72 people respectively.
Lahore attack was claimed by Jamaat-ul-Ahrar, a faction of Pakistan Taliban, while the shirne attack in Sindh was claimed by the Islamic State group.
The latest attack - in Charsadda - was also claimed by Jamaat-ul-Ahrar.