Witnesses said a blast was heard as a burqa-clad person attacked the court gate in Kohat, killing two persons and injuring several others.
They said firing persisted for half an hour in the area after the blast.
In another incident in the Khyber agency, at least five members of a 'peace committee' were killed in clashes with militants.
The militants have also kidnapped several members of the 'peace committee', according to reports.