South Africa played their final hand in the World Cup pool stages as they earned a bonus point win over Tonga - now it falls to their Pool B rivals Ireland and Scotland to play theirs.
The Springboks scored seven tries as they emerged 49-18 winners in the contest in Marseille, with the victory putting them top of their pool with 15 points, ahead of Ireland on 14 and Scotland on 10. Get the latest World Cup news by signing up to our newsletter here.
READ MORE: South Africa and Tonga players come together in stunning World Cup moment that's left millions in awe
READ MORE: Johnny Sexton tells referee to stop coaching South Africa and official thanks him in unseen footage
The final standings in Pool B are set to be decided in next week's monumental clash between Andy Farrell and Gregor Townsend's sides, with absolutely everything to play for. Scotland are the most up against it with Ireland having won every game at the tournament so far, but there is still a chance that the world number ones could be knocked out in a major shock.
And there is also the possibility that both teams make it through, with the reigning champions South Africa also facing the possibility of an early flight home. But how could such a situation materialise? Here's what you need to know.The current standings in Pool B
South Africa: 15 points (Points difference: +117)
Ireland: 14 points (PD: +122)
Scotland: 10 points (PD: +97)How can Ireland and Scotland both still qualify?
The Springboks have done all they can, with the result of their final game against Tonga leaving both Ireland and Scotland with a clear picture of what they must do to make it through.
With a bonus point win and a 31-point margin of victory against the Tongans, South Africa now sit at the top of Pool B.
However, they will be knocked out if Scotland score four tries and beat Ireland by 21 points while Andy Farrell's side score four tries of their own to earn a losing bonus point.
Such a result would see all three teams finish on 15 points in the group. In that situation, who goes through will first be decided by points difference, with Scotland progressing top with the highest.
Ireland would also make it through in second by virtue of having won their head-to-head match with the Boks, with Jacques Nienaber's men eliminated in the pool stage for the first time ever.
With Scotland having beaten Ireland just once in the last 10 years, it is certainly a big task for Gregor Townsend's men to pull this off - but anything can happen in rugby.
Here are next weekend's permutations in fullIreland win - Ireland and South Africa go through Scotland get 4 or 5 points and Ireland get none - Scotland and South Africa go through Scotland get 5 points, win by margin of 21+ and Ireland get 1 point - Scotland and Ireland go through
Scotland get 5 points, win by margin of less than 21 and Ireland get 1 point - Ireland and South Africa go throughScotland get 4 points and Ireland get 1 - Ireland and South Africa go through Scotland get 5 points and Ireland get 2 - Ireland and South Africa go through Scotland get 4 points and Ireland get 2 - Ireland and South Africa go through
The new Wales Rugby breaking news and top stories WhatsApp community has launched.
You can expect the day's top stories and major updates sent directly to your WhatsApp from our team - allowing you to stay up to date with all the latest Welsh rugby news for free.
The next few months are the biggest in rugby for four years as Warren Gatland's team prepare for and then head to the Rugby World Cup. We'll be with you every step of the way, keeping our community of readers and fans in the loop with the stories that matter.
All you have to do to join is click on this link, select 'Join Community' and you're in.
No one else in the community will be able to see your personal information and you will only receive messages from the WalesOnline sport team. We will not spam your WhatsApp feed with constant messages, but you will receive updates from us daily.
We also treat our community members to special offers, promotions, and adverts from us and our partners.
If for some reason you decide you no longer want to be in our community, you can leave by clicking on the name at the top of your screen and clicking 'Exit Group'.
You can read our Privacy Notice here.
JOIN OUR WHATSAPP COMMUNITY HERE
So, if three teams are tied on points and have all beaten each other, the winner will likely be decided by points difference.
World Rugby then state: "For clarification, in the case of a tie between three or more Teams at the end of the pool phase, once the highest ranked Team has been determined following the above criteria, to determine the next higher ranked Team the process would repeat, starting at criterion 1 (ie, who won the head-to-head between the two remaining sides).
Here's a reminder of the points on offer from each match at the Rugby World Cup.Four points for a win Two points for a draw One bonus point if a team scores at least four tries One bonus point if a team lose by no more than seven points