Television pictures showed that the mosque had been blown to pieces.
Noor Mohammad, a policeman in the tribal region, told the BBC: "The blast took place just before the prayer leader announced the start of prayers.
"I was standing on the verandah outside the mosque because I was late and could not find space inside. After the explosion, the doors into the mosque caught fire. Moments later, the mosque collapsed."
The attack came just hours before US President Barack Obama was due to unveil details of a new strategy to fight militants in Afghanistan and Pakistan.
Pakistan's security officials have recently concentrated forces in the Khyber region, and especially the Jamrud area, to fight militants attacking convoys carrying supplies for the Nato forces in Afghanistan.
Some reports say the operations have been co-ordinated by US intelligence officials, and security forces say they have captured or killed several al-Qaeda members in the operations.
The Khyber administrator, Tariq Hayat, said people in the area had been co-operating with security forces.
No-one has claimed responsibility for the attack, which could also be linked to disputes between local tribal militias, says our correspondent.
On Thursday, at least 10 people were killed in a suicide bombing in Jandola in South Waziristan.
That attack, at a restaurant, was blamed on rivalry between militant factions.
Officials said a group of militants opposed to Pakistan's top Taleban commander had been in the restaurant.
At least 25 people were killed last month in a suicide bomb attack on a funeral procession in Dera Ismail Khan, a town in North-West Frontier Province, close to the semi-autonomous tribal area.
The bomber targeted the funeral of a Shia Muslim cleric who had been gunned down the day before.
The town has a history of sectarian violence between its Sunni and Shia Muslim communities.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.