Florencia Bonsegundo converted a penalty kick in the fourth minute of second-half stoppage time on her second attempt, and Argentina overcame a three-goal deficit in the final 30 minutes for a 3-3 draw against Scotland on Thursday night that eliminated the Scots from the Women's World Cup.

Scotland built a 3-0 lead on goals by Kim Little in the 19th minute, Jenny Beattie in the 49th and Erin Cuthbert in the 69th, but Argentina became the first team at a Women's World Cup to get a point after trailing by three goals.

Milagros Menéndez scored on a counterattack in the 74th minute and Bonsegundo's long-range shot five minutes later hit the crossbar, bounced down and had enough backspin to go off the fingertips of goalkeeper Lee Alexander and across the line.

Scotland's Erin Cuthbert covers her face at the end of the Women's World Cup Group D soccer match between Scotland and Argentina at Parc des Princes in Paris, France, Wednesday, June 19, 2019. The match ended in a 3-3 draw. (AP PhotoAlessandra Tarantino)

Scotland's Erin Cuthbert covers her face at the end of the Women's World Cup Group D soccer match between Scotland and Argentina at Parc des Princes in Paris, France, Wednesday, June 19, 2019. The match ended in a 3-3 draw. (AP PhotoAlessandra Tarantino)

Sophie Howard had just entered the game when she slid into a leg of Aldana Cometti, who was streaking into the penalty area. After a lengthy video review, North Korean referee Ri Hyang-ok awarded the penalty kick. Alexander dived to stop the kick by Bonsegundo, who could not get the rebound in. But another video review showed Alexander came off her line before the kick.

Given the second chance, Bonsegundo kicked the ball to the right of the keeper, who dived left.

Scotland, which had been on the verge of winning a Women's World Cup match for the first time, could not muster a threat in the remaining stoppage time and finished last in Group D at 0-3.

Scotland's Rachel Corsie gestures at the end of the Women's World Cup Group D soccer match between Scotland and Argentina at Parc des Princes in Paris, France, Wednesday, June 19, 2019. The match ended in a 3-3 draw. (AP PhotoAlessandra Tarantino)

Scotland's Rachel Corsie gestures at the end of the Women's World Cup Group D soccer match between Scotland and Argentina at Parc des Princes in Paris, France, Wednesday, June 19, 2019. The match ended in a 3-3 draw. (AP PhotoAlessandra Tarantino)

Argentina finished with two points after opening with a 0-0 draw against Japan — its first World Cup point — and losing to England 1-0.

Four of the six third-place teams advance, and Brazil (six points) and China (four points) are assured of two of those spots. Nigeria finished third with three points.

Argentina would advance if both the Cameroon-New Zealand and Thailand-Chile matches on Thursday finish in draws. Argentina was eliminated in the group stage of its first two World Cup appearances.

Argentina's Florencia Bonsegundo celebrates after scoring an equaliser goal during the Women's World Cup Group D soccer match between Scotland and Argentina at Parc des Princes in Paris, France, Wednesday, June 19, 2019. Bonsegundo scored in the extra time and the match ended in a 3-3 draw. (AP PhotoAlessandra Tarantino)

Argentina's Florencia Bonsegundo celebrates after scoring an equaliser goal during the Women's World Cup Group D soccer match between Scotland and Argentina at Parc des Princes in Paris, France, Wednesday, June 19, 2019. Bonsegundo scored in the extra time and the match ended in a 3-3 draw. (AP PhotoAlessandra Tarantino)

More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports

Scotland's Jane Ross, right, comforts teammate Sophie Howard, center, at the end of the Women's World Cup Group D soccer match between Scotland and Argentina at Parc des Princes in Paris, France, Wednesday, June 19, 2019. The match ended in a 3-3 draw. (AP PhotoAlessandra Tarantino)

Scotland's Jane Ross, right, comforts teammate Sophie Howard, center, at the end of the Women's World Cup Group D soccer match between Scotland and Argentina at Parc des Princes in Paris, France, Wednesday, June 19, 2019. The match ended in a 3-3 draw. (AP PhotoAlessandra Tarantino)