The attacker struck at the time of Friday prayers at the base the banned Lashkar-e-Islam in the remote Tirah Valley, which borders Afghanistan.
The blast ripped through the mosque-cum-madrassa, killing 13 people instantly, officials of the political administration told the media.
The bomber detonated his explosive vest when some Lashkar-e-Islam militants intercepted him and opened fire.
Eight members of Lashkar-e-Islam were among the dead.
According to one report, the attacker was trying to plant a bomb, which went off when the Lashkar-e-Islam men opened fire.
The Lashkar-e-Islam base is run by Yar Walil Khan, the nephew of the group's chief, Mangal Bagh Afridi.
The fate of Yar Wali Khan could not immediately be ascertained.
A spokesperson for the banned Tehrik-e-Taliban Pakistan claimed responsibility for the attack in phone calls to the media in northwest Pakistan.
The Lashkar-e-Islam and the Taliban have been engaged in a turf war in Khyber Agency for over a year.
The same mosque was targeted by the Lashkar-e-Islam's rivals on February 18 last year.
At least 30 people were killed and over 70 injured in that attack.
The latest attack came exactly three weeks after a suicide bombing at another Lashkar-e-Islam mosque in Tirah killed 22 people after Friday prayers.