The bomb was planted in a pick-up truck that was parked at a stand for trucks and buses at the market in Jamrud, one of the main towns of Khyber Agency.
All persons sitting in the truck were killed instantly when the bomb went off, witnesses said.
Officials of the political administration told the media that at least 29 people had died in the attack.
The injured were initially taken to nearby hospitals.
Those with serious wounds were shifted to Peshawar city, the capital of Khyber-Paktunkhwa province.
The blast damaged a petrol pump and several vehicles.
Reports said members of an anti-Taliban militia were passing through the market at the time of the explosion.
No group claimed responsibility for the attack.
Several militant groups, including the Tehrik-e-Taliban Pakistan and Lashkar-e-Islam, are active in the region.
The Tehrik-e-Taliban Pakistan recently warned it would carry out attacks in retaliation for operations against its fighters in the tribal belt.