Scotland’s hopes of progressing to the knockout stages of the Women’s World Cup ended in controversial style after they drew 3-3 draw with Argentina at the Parc des Princes in Paris.
Kim Little broke the deadlock for the national team with her 54th international goal in the first half after Argentina were denied by the woodwork.
Jennifer Beattie doubled the advantage four minutes into the second half before Erin Cuthbert added the third.
Argentina pulled one back through Milagros Menendez after 75 minutes before Florencia Bonsegundo’s long-range strike set up a nervy finale.
Lee Alexander looked set to be the hero for the Scots after saving a Bonsegundo penalty in the dying embers after Sophie Howard was penalised for a foul on Aldana Cometti.
But the spot-kick had to be retaken after VAR ruled the Scotland goalkeeper had stepped off her line before the penalty was taken and the Argentina player made no mistake second time around.
The result means the Scots finished bottom of their group with only one point from their three matches.
Scotland made a positive start to the match with Erin Cuthbert shooting wide from the edge of the penalty area in the opening stages.
But Shelley Kerr’s side  enjoyed a lucky escape in the 17th minute when Mariana Larroquette’s header crashed back off the crossbar and Sole Jaimes was thwarted by Lee Alexander on the rebound.
The Scots made the most of that good fortune two minutes later by breaking the deadlock.
Cuthbert’s displayed great skill and persistence to drive into the penalty area. Her shot was well saved by Vanina Correa but Cuthbert kept the chance alive by squaring the ball for Little to slot home from close range.
Jaimes showed a deft touch inside the Scotland penalty area but a superb sliding challenge from captain Rachel Corsie prevented the Argentine getting her shot away.
Caroline Weir tried her luck in the final moments of the half but her long-range attempt flew high and wide.
The Scots made the perfect start to the second half when Manchester City midfielder Weir sent in a tantalising cross for Beattie to head home.
Marina Larroquette was fortunate to avoid punishment for a wild lunge on Nicola Docherty before Scotland made it three in the 69th minute.
Leanne Crichton rose highest to nod a Weir corner goalwards but when her attept was tipped onto the post by Correa, Cuthbert reacted quickly to tap home into an unguarded net.
Argentina capitalised on a defensive mix-up with 15 minutes remaining to allow substitute Milagros Menendez to calmly roll the ball past the advancing Lee Alexander.
It became increasingly nervy for the Scots when Argentina scored a second when Alexander was unable to keep out Florencia Bonsegundo’s long-range strike with 11 minutes to go.
And the match ended in disaster when Bonsegundo converted from the penalty spot at the second attempt in the fourth minute of injury time.