Samoa knew victory would keep their own hopes of quarter-final qualification open - a result that would have put immense pressure on Wales to beat Fiji on Sunday morning.
But a Bryan Habana try, together with a penalty and conversion from Morne Steyn and a penalty from namesake Frans, saw the Springboks home.
The Lions' last conquerors led 13-0 at the break and, although former London Irish and now Ospreys No8 George Stowers claimed a second-half try for Samoa, Wales now only need a losing bonus point in the final group fixture.
Having had their last World Cup adventure ended prematurely by the Fijians in Nantes four years ago, Wales will be relieved to have seen Samoa's challenge all but wither away on Friday.
Samoa could still pip Wales to second spot but only if Fiji defeat Warren Gatland's men by 39 points and prevent them from picking up either a losing or try-scoring bonus in the process.
Fiji's own chances of making it through to a likely quarter-final clash with Ireland are even more remote, with only an 85-point winning margin, a try-scoring bonus point and a Welsh failure to gain a bonus point themselves being enough to see them through.
While Wales now look set to make amends for their disappointment in 2007, England or Scotland, or even both, could beat them to it tomorrow morning.
England currently top Pool B and know a losing bonus point will be enough to see their World Cup campaign continue, while Scotland's chances are less certain. Realistically, Scotland need to beat the Auld Enemy by more than seven points to keep their own hopes alive.
Ireland's scenario on Sunday is far clearer, with Declan Kidney and co knowing victory over Italy would see them win their group, while a draw or even two losing bonus points could also see them finish above both the Azzuri and Australia.