The clashes erupted when unknown gunmen fired at a police van patrolling the suburbs of Peshawar.
“One policeman was killed while four others were wounded in exchange of fire with militants. Two militants were also killed in the fight,” Rana Omer, a senior police official in Peshawar, told AFP.
“The militants fired at our mobile team which was on a routine patrol in Pushtakhara area at night. We responded to the gunfire and killed two attackers while one escaped after being wounded,” he said.
Another senior police official, Mubarak Zeb, confirmed the incident.
Peshawar has suffered numerous Taliban attacks but it was not immediately clear that who was behind this ambush.
The city suffered the worst terror attack in Pakistani history in December when Taliban gunmen massacred more than 150 people, most of them children, at an army-run school.
But recently then there has been a lull in violence. The last deadly attack in the city came in February when three heavily armed Taliban militants stormed a Shiite mosque, killing 21 people.
Pakistan has been waging a major offensive against insurgent hideouts in the tribal northwest for over a year in a bid to quell an Islamist insurgency that has raged for more than a decade.
Officials say nearly 3,000 militants have been killed since the launch of the latest offensive.