Two policemen were killed and three injured in a militant attack in the Parmoli area of Swabi district early on Friday.
An accused in police custody was also killed when the militants opened fire on the police vehicle.
Officials said the policemen were on a routine patrol in the Parmoli area when unidentified armed men on motorcycles opened fire on the police van, injuring five men.
They were rushed to District Headquarter Hospital Swabi where two of them succumbed to the injuries.
District Police Officer Dr Mian Saeed told Pakistan Today that they had identified the five militants. He said efforts were underway for their arrest.
Terrorist attacks are occurring in the Parmoli area from the last several months. Awami National Party candidate for provincial assembly Amir Rahman survived in a similar attack in the area during an election rally.