To reach the decider at the North Harbour Hockey Stadium, New Zealand would have to beat unbeaten Australia in the final post-pool clash tomorrow and hope that earlier the Dutch had beaten Spain. Even then, goal difference could be decisive.
Australia, 4-2 winners over The Netherlands in the first of the top four matches yesterday, are already through to the final as they chase an unprecedented fourth straight title.
After being held to 1-0 at halftime and level at 1-1, 12 minutes into the second half, the Kookaburras powered home with three goals in 14 minutes to make certain of the final.
The Black Sticks went into the game with Spain well aware that a win would all but guarantee their place in the tournament finale.
When Andy Hayward powered his drag flick hard and low into the Spanish goal after 15 minutes Kiwi hopes rose. Seconds earlier, the Black Sticks had successfully defended Spain's first penalty corner, burst quickly downfield and created the same opportunity.
In quick succession, the home team made chances for Blair Hilton, Phil Burrows, also with a reverse stick effort, and Ryan Archibald, after a classy one-two with Burrows. All failed to find their mark.
From their second penalty corner, four minutes before the break, the Spaniards failed with their first strike as Kyle Pontifex blocked. Unluckily for him, the ball flew and Ramon Alegre batted home from close range.
That was quickly put behind the New Zealanders when Shea McAleese dribbled along the base-line before pushing the ball to Hilton who tapped home to re-establish their one-goal margin just 64secs into the second spell. But any joy was short-lived as Eduard Tubau was given too much space and was untroubled in locking it up again.
Five minutes from time and with the Black Sticks defence surrendering possession too easily, David Alegre completed his family's double act in potting the winner.
"Too many turnovers both on attack and in defence," bemoaned Burrows. "If you lead twice in a game you shouldn't lose. We got caught on the ball too much.
"But, whatever happens, we will still be playing for a medal on Sunday. That has to be the silver lining." And, it could be against the Spaniards.
"I'm not sure scoring that goal early in the second half was good or bad," said coach Shane McLeod. "Maybe it came too early and gave Spain plenty of time to come back.
"I was disappointed we did not do better. I thought we were worse when we were in the lead. That's not a characteristic we want."
Classy Spanish captain Santi Freixa was bemused by the outcome.
"It was amazing that for the first 25 minutes we were super disconnected," said Freixa.
Looking ahead to tomorrow's clash with the Dutch, he was philosophical. "You are not in a good place when you play the orange ones."