Thembi Kgatlana scored a last-gasp winner as South Africa created history by securing their first ever Women's World Cup win.
The African side held their nerve to seal a 3-2 victory on Wednesday over Italy that sent them through to the last 16 of the tournament at the expense of their opponents in Wellington.
Striker Kgatlana struck two minutes into stoppage time to set up a clash with the Netherlands in Sydney on Sunday and broke the hearts of the Italians, who had only needed a draw to progress.
On a night of high drama, the Italians opened the scoring when Karabo Dhlamini tripped Italy forward Chiara Beccari just inside the box in the 10th minute and Arianna Caruso put the penalty into the bottom left corner of the net.
South Africa equalised in the 32nd minute through an own goal from Benedetta Orsi, who did not check where goalkeeper Francesca Durante was before making a back pass.
Hilda Magaia scored in the 67th minute to put South Africa 2-1 ahead before Caruso equalised with her second goal of the match, briefly denting South African hopes.
Italy thought they had salvaged the draw they needed to go through with 16 minutes left, before Kgatlana's stunning late intervention.
"Over the last two weeks, I've lost three family members. I could have gone home but I chose to stay with my girls," said Kgatlana, who plays for Racing Louisville in the United States.
"Because that's how much it means."
Coach Desiree Ellis, whose side were beaten 2-1 in the last minute in their opener against Sweden and then drew 2-2 with Argentina, added: "This is just amazing. I thought they were incredible.
"I said we were going to fight for every ball. We said we're not going to give up and they were absolutely magnificent.
"This victory is for everyone back home, people that got up in the early hours of the morning to support us – that is for them."
In the other match early in the day, Rebecka Blomqvist’s second-half goal lifted Sweden to a 2-0 win over Argentina to advance the Blagult to a round-of-16 showdown with the United States.
Argentina were thus eliminated from the tournament.
Meanwhile, Colombia's coach Nelson Abadia revealed Linda Caicedo underwent X-rays after health scares at the World Cup but is "100 per cent" fit for the clash with Morocco on Thursday.
The 18-year-old Real Madrid attacker, who was diagnosed with ovarian cancer at 15 but made a full recovery, has lit up the World Cup with goals in wins against South Korea and Germany.
In the upset over two-time champions Germany, Caicedo scored one of the goals of the tournament, days after going down in training clutching her chest.
She also appeared to suffer breathing difficulties in that 2-1 win but carried on playing.
Abadia said X-rays on Caicedo had not detected any issues.
"She went through a check-up... to be sure that she is at 100 per cent. You can be assured that she is at 100 per cent," Abadia said in Perth on Wednesday.
"She's here training with us. She was not feeling well in one of our training sessions but it was brief.
"We are always careful with players' health. We want to make sure that Linda feels that she's okay... and she is."
In Thursday's other game, Germany need to beat South Korea to guarantee progress to the last 16. Should Morocco better their result when they face the already-qualified Colombians then it will be the Lionesses of Atlas who progress.