There was a sense of deja vu as Scotland lost a last-minute goal against Spain for the second successive meeting between the two sides.
Four years ago, Veronica Boquete's winner denied Anna Signeul's side a place at the Euro 2013 finals.
But the disappointment this time round was every bit as real as Virginia Torrecilla cancelled out Emma Mitchell's opener in the dying seconds.
It kept intact Spain's unbeaten record under new head coach Jorge Vilda.
Despite the visitors enjoying the bulk of possession early on, it was Scotland who created the first real chance, Leanne Ross combining with Jane Ross before firing in a low cross that goalkeeper Dolores Gallardo managed to smother at the feet of the on-rushing Kim Little.
The visitors' best chance fell to Amanda Sampedro, but her header looped harmlessly over goalkeeper Gemma Fay's crossbar.
Jane Ross was a constant threat for Scotland, causing problems with her pace and movement, but neither team were able to create much in the way of a goalscoring opportunity.
It was no surprise then that the opening goal came from a strike from distance, Mitchell going on a powerful run from her left-back position before unleashing an unstoppable effort that Gallardo could only parry into her own net.
The goal sparked Spain into life and Alexia Putellas should have found an equaliser after a passage of intricate build-up play found her in space in the box, but the strike was well over.
Jane Ross came agonisingly close to ensuring the win late on as she connected with Mitchell's cross from the left, but Gallardo was able to get her body in the way and deny what would have been a very deserved goal for the Scotland striker.
Then came the sucker punch. With the clock ticking over to 90 minutes, Spain won a corner and Torrecilla found the touch to finally beat Fay in the Scotland goal.
Scotland, presently ranked 21st in the world, will take positives from a match where they went toe-to-toe with a top-15 ranked nation - Spain are at their highest-ever position of 14th.
Signeul's side now build towards next month's crucial Euro17 qualifier against Slovenia in Paisley.
Scotland head coach Anna Signeul: "I thought we did better in the second half and started to take the game to them and played some really good passes.
"It was just fantastic to see what excellent players we have on the pitch and I think Kim Little was brilliant.
"Spain had some great chances also, so maybe it was a fair result, although it was sad to lose at the end from a set-piece.
"It was important that we redeemed ourselves after the defeat in Sweden and I felt this was the standard we are capable of.
"Spain played their strongest team and we put in a very strong performance."