Most of the dead were worshippers taking part in a night vigil which was stormed by armed men, officials said.