At least 27 people were killed and over 50 injured when a suicide bomber blew himself up outside a Shia mosque in Pakistan's restive northwest Friday as worshippers were leaving after Friday prayers.

The attacker detonated his explosives in a narrow alley near the imambargah at Pat Bazar in Hangu town of Khyber-Pakhtunkhwa province.

Hangu district police chief Mian Mohammad Saeed confirmed the attack was carried out by a suicide bomber.

Other officials said they had found the head and body parts of the attacker.

Saeed said the attack had targeted Shias but people leaving the Sunni mosque were also among the victims.

Officials said nearly 20 people were killed instantly and others died in hospital.

No group claimed responsibility for the attack.

Please read our terms of use before posting comments