But the Black Sticks made a stupendous comeback in the final 10 minutes of the game and scored through Hayden Phillips (50th) and Kane Russell (56th) to share the spoils and secure their place in the cross-over round of the tournament.
As per the format of the tournament, the top four teams from four pools will directly qualify for the quarterfinals while the second and third placed sides will play cross-over matches against teams of other pools for the remaining four last eight berths.
In the encounter between Spain and New Zealand, it was the Black Sticks who had the first shy at the goal in the sixth minute but Hugo Inglis strike from close range was saved by Spain captain and goalkeeper Quico Cortes.
It was Spain who struck first when Beltran scored from a through ball from Pau Quemada.
Thereafter both the teams made a couple of good moves but they lacked the final touch inside the box.
Spain earned their first penalty corner in the 25th minute but failed to utilise the opportunity.
Spain extended their lead in the 27th minute when Iglesias scored from close range in the midst of a crowd of Black Sticks from a Ricardo Santana feed.
After an uneventful third quarter, New Zealand pulled a goal back in the 50th minute through Phillips, who received a pass from Inglis on the left side and took his time to smash it into the roof of the net.
Pumped by the goal, New Zealand went all out in search of the equaliser and four minutes away from the final hooter their efforts bore fruit when Russell found the back of the net from Black Sticks' only penalty corner of the match.