New Zealand's women's Black Sticks have been made to work hard for a 2-1 win over Spain to keep their hopes of a quarter-final berth alive.
Two goals to Kelsey Smith led the way for the Kiwis as lowly Spain put up a tremendous fight on the turf.
The win was the side's second in the Olympic tournament and temporarily moves them to the top of their pool, equal with the Netherlands on six points.
Spain largely dominated the opening quarter of a scrappy opening to the match, the Black Sticks struggling to find any momentum on attack especially.
Against the world's 14th ranked side, the New Zealanders took their time in establishing themselves. Halfway through the second quarter they opened their account with Kelsey Smith scoring from a penalty corner set play.
The opening goal seemed to be the boost the side were looking for as they dominated the rest of the half's proceedings.
However, Spain came out fighting after the break and their tenacious defence was able to deny New Zealand any further goals until six minutes into the final quarter when Smith bagged a double with a deflection into the Spanish goal.
With five seconds on the clock Spain scored a consolation goal out of nowhere, their first of the tournament, as the New Zealanders seemed to lose focus in the closing stage of the match.