The attack, in eastern Nangarhar province, targeted worshippers during Friday prayers.