The powerful explosion ripped through the office of the "aman committee" or militia in the central market of Darra Adam Khel.
Members of the militia, formed to fight the Taliban, were among the dead and injured. Sixteen people were killed instantly. Two children were among the injured.
At least 20 shops and eight cars were destroyed by the blast, police officials and witnesses told the media.
People with serious injuries were rushed to the Lady Reading Hospital in Peshawar, the capital of Khyber-Pakhtunkhwa province.
Officials at the hospital said they had received six bodies and 22 injured, including five who were in a serious condition.
No group claimed responsibility for the incident though such attacks are usually blamed on the banned Tehrik-e-Taliban Pakistan.
The Taliban had a strong presence in the Darra Adam Khel region till the army launched an operation to flush them out of the area in 2009.
Khyber-Pakhtunkhwa Information Minister Mian Iftikhar Hussain said the militants were trying to increase pressure on the authorities following reports that a fresh operation could be launched against them in the tribal belt.