Spain and New Zealand went head-to-head in the Champions Trophy with the winners knowing a win would leave qualification for the final in their own hands.