A late fightback from Spain has taken the gloss off one of the most impressive performances of the Tony Gustavsson era as the Matildas grabbed a 3-2 Cup of Nations win in Sydney.
Australia raced out to a 3-0 half-time lead at CommBank Stadium with goals from livewire winger Cortnee Vine, veteran defender Clare Polkinghorne and striker Caitlin Foord.
But just as Australia were about to state their World Cup credentials with a clean sheet, Spain hit them with two goals in the last 20 minutes.
The late flurry from the visitors shouldn't take away from the fact that the Matildas played some of their best football seen under the Swede
Over the past two years of Gustavsson's tenure, the Matildas have exposed themselves to some of the world's top nations and often come up short.
But in the first half against the world No 7 La Roja, they played at an unrelenting pace which the Spanish were unable to match.
Gustavsson's side, who play their final Cup of Nations fixture against Jamaica in Newcastle on Wednesday, have now won their past six games.
Spain began ominously, however, making their intent known early as they looked to play in behind the Matildas' line.
Twice the Australian back four breathed a sigh of relief that the referee's assistant got them out of jail by flagging for offside.
But soon the action was down the other end, Sydney FC winger Vine opening the scoring from the edge of the box with a perfectly weighed first-time strike to give Australia the lead.
Foord made one jinking run nearly 90 seconds later which glanced just wide, before Polkinghorne made it two for the Matildas in the 16th minute.
Spain's Marta Carro failed to clear a flick-on by Sam Kerr and Polkinghorne was on hand to stab the ball home at the back post.
Kerr had a goal ruled out for offside but the Matildas continued to hunt for a third.
This time Foord delivered as she headed an inch-perfect Steph Catley freekick past Spanish goalkeeper Maria Rodriguez.
Australia had another goal ruled out for offside — this time through Foord in the second half.
Spain grabbed one back in the 73rd minute through a long-range Olga Carmona effort before Alba Redondo notched a second for the visitors in the 90th minute.
AAP/ABC