A suicide bomber screamed "Allahu Akbar" and detonated himself in a packed mosque in a northwestern Pakistan, killing at least 25 people and wounding more than 30 during Friday prayers.

A second regional official confirmed the bombing in the village of Payee Khan, in the troubled Mohmand region of the lawless Federally Administered Tribal Areas (FATA) bordering Afghanistan.

"The suicide bomber was in crowded mosque, he shouted 'Allahu Akbar' (God is greatest) and then there was a huge blast," Naveed Akbar, deputy administrator of Mohmand agency, told Reuters.

Source: b'Representational Image Source: Reuters'

Shaukat Khan, another official in the northwestern FATA region, said at least 25 people were wounded.

"Many people were gathered inside the mosque where a suicide bomber blew himself up," he said.

Local tribal elder Haji Subhanullah Mohmand said the attack may have been carried out by Islamist militants seeking revenge after local tribesmen gathered a volunteer force and killed one and captured another insurgent.

Pakistan's frontier regions, which are deeply conservative and hard to access due to rough terrain, have long been the sanctuary of fighters from al Qaeda, the Taliban and other Islamist groups.

(Feature Image Source: Twitter/Outlook)