Striker Lloyd Norris-Jones nailed the winner on the backhand into the far corner with 24 seconds left in this pulsating Test match.
Penalty corner drag-flick ace Daniel Bell had equalised for SA with six minutes left in the match, this after Spain had gone 1-0 up in the second chukka when a lapse in concentration in defence opened the path for Miki Delas to net a deflection goal.
Turning around 1-0 down, after playing against the wind in the first half, SA played with grace and style to delight the home crowd.
SA head coach Fabian Gregory was full of praise for his young, untried and inexperienced team.
"It was a magnificent performance, we could have been in front by two goals early on in fact. Playing against the wind or not, world stars or not, these youngsters don't know the meaning of fear.
And the experience and know-how of the likes of captain Rhett Halkett and Jethro Eustice has shown also that everyone has answered the challenges of raising the team standard.
Gregory said defensively SA were "fantastic" for the most part while he could not say enough about the value every single one of the SA squad players - including those outside the 18 that took on Spain - brought to the party.
"The lads played like Trojans and I am very chuffed to say we were full value in defeating a Rio Olympic Games team. A great night for SA hockey."
University of Cape Town student Charlie Bowren certainly has a tale to tell his grand kids one day. It's not every day that an SA men's hockey team debutant gets to beat a country that's qualified for the Olympic Games.