Rescue workers frantically tried to extinguish fires that engulfed several cars in the minutes after the attack near a major market in the city of Peshawar.
Sifwat Ghayur, the head of the Frontier Constabulary, was killed in the attack along with his driver and bodyguard, said Abdul Rahman Khan, a local police officer. The explosion also injured seven other people, he said.
The attack comes as the northwest, which has been plagued by violence at the hands of the Pakistani Taliban, is trying to get back on its feet after heavy monsoon rains.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.