The rockets are often fired by fringe Islamist groups, but Israel holds Gaza’s rulers Hamas responsible for any attacks from the territory and has repeatedly retaliated, targeting Hamas positions.