Scotland crashed out of the Women's World Cup in heart-breaking fashion after letting slip a three-goal lead to draw 3-3 with Argentina.
Shelley Kerr's side appeared on course for the win they needed in their final group game as goals from Kim Little, Jennifer Beattie and Erin Cuthbert put them 3-0 up with 21 minutes remaining at the Parc des Princes.
Qualification for the knockout stage was within Scotland's grasp as one of the best third-placed finishers.
But Argentina hit back through goals from substitute Milagros Menendez and Florencia Bonsegundo, who then scored a retaken penalty in stoppage time after her initial spot-kick had been saved to send the Scots home in the cruellest of circumstances.
Scotland coach Kerr made three changes to her side following defeats against England and Japan.
Midfield pair Nicola Docherty and Leanne Crichton plus forward Claire Emslie stepped into the starting line-up and Scotland made a promising start.
Cuthbert dragged an early shot wide from Docherty's dangerous cross as the Scots looked to push forward.
Kerr's side looked vulnerable on the counter-attack though and almost went behind in the 17th minute when Mariana Larroquette's header struck the crossbar.
But two minutes later Scotland took the lead. Cuthbert reacted well after her powerful shot was parried by Argentina goalkeeper Vanina Correa, playing the rebound across the six-yard area for Little to tap home.
Argentina still posed a threat going forward and a well-timed tackle by Rachel Corsie in the penalty area denied Sole Jaimes a shot on goal.
Crucially, Scotland gave themselves a cushion with a second goal four minutes into the second half when defender Beattie headed home Caroline Weir's excellent cross.
Argentina were forced to chase the game and Cuthbert almost took advantage of the gaps at the back by forcing Correa into a decent save.
Cuthbert was then on hand to turn home Scotland's third goal from another rebound in the 69th minute after Correa had pushed Crichton's powerful header on to the crossbar.
The Scots were then dealt a double whammy as the South Americans struck twice in three minutes to put qualification back on a knife edge.
Argentina substitute Menendez took advantage of a defensive mix-up to fire under goalkeeper Lee Alexander in the 74th minute and Bonsegundo fired a shot from outside the area in off the underside of the crossbar in the 78th minute.
Scotland's worst fears appeared to have been realised when Sophie Howard, moments after stepping off the substitutes' bench, sent Aldana Cometti tumbling in the box with four minutes left.
Bonsegundo's spot-kick, awarded after being referred to the video assistant referee, was saved by Lee, but in an incredible finale the VAR ordered a retake after ruling the goalkeeper had moved both feet off her goal line and the Argentinian struck the equaliser.