A blast tore through a mosque on Friday in northwestern Pakistan, police said, injuring an Islamist party leader and three others, including children.