Spain have moved 2-1 up in the four-match series against Ireland thanks to this victory on the Costa del Sol.
Katie Mullan shot just over the Spain crossbar before Aisling Naughton fired into the net to put the Irish in front in Benalmadena.
Marta Segu levelled on 33 minutes and Spain sealed the win with two goals in five minutes in the final quarter.
Alicia Magaz gave the hosts a 2-1 advantage before Segu completed her double.
Spain hammered the visitors 7-0 in the opener before Ireland won Thursday's encounter 2-0.
The teams meet for a final time on Sunday morning at the same venue.