South Africa are into the last 16 after claiming their first Women's World Cup win with a thrilling 3-2 victory over Italy in Wellington.
Thembi Kgatlana's stoppage-time winner came after Italy fought back to level with an Arianna Caruso header.
The late drama completed an emotional fortnight for the South African goalscorer.
"Over the last two weeks, I've lost three family members. I could have gone home but I chose to stay with my girls," Kgatlana said.
"Because that's how much it means."
South Africa will play Group E winners the Netherlands on Sunday.
Knowing a win would guarantee their place in the knockout rounds, Italy got off to the perfect start when they were awarded a penalty as Karabo Dhlamini caught the heels of teenager Chiara Beccari and Caruso calmly converted to put her side in command of their World Cup future.
However, South Africa were gifted a leveller as Benedetta Orsi, playing her first World Cup match, hit a no-look back pass to a surprised Francesca Durante and it rolled into her own net.
Ellis' side burst into the lead when Kgatlana slipped a clever ball through the Italy defence to put Hildah Magaia through on goal and she lifted it over Durante.
VAR seemed like it may have come to South Africa's rescue when Caruso equalised from a corner, but after a lengthy delay the goal was given.
A draw would have been enough to take Italy into the knockout rounds, but Magaia stepped through the defence and squared to Kgatlana, who found the net.