Scotland 16 South Africa 34
Scotland's bid to reach the World Cup quarter-finals will go down to the wire after they suffered a 34-16 defeat to South Africa at St James' Park.
The Dark Blues could have clinched a place in the knockout rounds had they seen off the Springboks in Newcastle.
But instead they will now have to beat Samoa at the same venue in a week's time or else risk suffering the same nightmare they went through four years ago in New Zealand when they failed to escape their group.
The Tartan Army were expected to pour over the border and pack out the 52,000-capacity ground, but there was a sizeable South African support present in the north east to cheer on the Boks, who now top Pool B, a point in front of the Scots, with Japan a further two back.
Their team stormed ahead within 13 minutes when a combination of Schalk Burger, Bismarck du Plessis and Duane Vermeulen managed to force through the Scottish defence and get the ball grounded, with Burger seemingly the man adding the scoring touch.
There was no doubting the next score two minutes before the break when JP Pietersen crashed over.
Scotland touched down when Tommy Seymour finished off after Duncan Weir's daring solo run but Bryan Habana removed any doubt with his side's third try seven minutes from time.
Injury issues hampered both sides in the build-up. The Scots lost lock Grant Gilchrist for the tournament last week against the United States, while stand-off Finn Russell and flanker John Hardie were also ruled out hurt.
The Springboks, meanwhile, waved goodbye to captain Jean de Villiers, who announced his international retirement after the broken jaw he suffered against Samoa last week ended his World Cup.
It was Scotland's third match in 10 days but head coach Vern Cotter knew defeat would not be a fatal blow to his side's qualification hopes. Clearly, with one eye on next Saturday's clash with the Samoans, that is why he named a side missing what could reasonably be regarded as five of his first picks when fit.
It has been a patchy year for the Boks. November was the last time they managed back-to-back wins and no one needs reminding of the humiliation they suffered against Japan in Brighton two weeks ago.
But from the off there was little doubt they would follow up last weekend's morale-restoring success over Samoa with another victory.
While the South Africans were imperious at the line-out, Scotland hooker Fraser Brown struggled to get on the same wavelength as the Gray brothers, Richie and Jonny.
The tempo of the Scottish ball from the breakdown just was not rapid enough and with their momentum stalled, the muscle-bound Boks simply powered through some limp tackling.
The Scots started boldly enough, turning down a make-able penalty to go for the corner. But when their set-piece failed South Africa marched on.
The pressure told after 13 minutes when Burger apparently managed to get downward pressure on the ball as a green horde crashed over the Scottish line following a series of surges.
Handre Pollard added the conversion and then two penalties before Scots skipper Greig Laidlaw finally put his side on the scoreboard with a kick of his own.
A glimmer of hope flashed the Dark Blues' way when Jannie du Plessis was sin-binned for smashing a shoulder into prop Gordon Reid's face, but Laidlaw was short with the penalty.
Being a man down did not hold South Africa back as they made the most of Scotland's vulnerability to the driven maul, moving the ball quickly from Fourie du Preez to Pietersen for a simple score, again converted by Pollard.
Scotland came out fighting after the break, landing another Laidlaw penalty just after the restart before Weir's moment of magic gave them hope after 49 minutes.
The little Glasgow 10 pounced on Pollard's pass to Jesse Kriel before setting off on an 80-yard burst. After putting Pollard on his backside with a clever side step, he was halted by Pietersen five yards short of the line but popped the ball to Tim Visser, who batted on to Seymour to finish off an incredible touchdown.
Laidlaw converted but Pollard recovered some of those losses with a swift drop-goal.
When the Scottish captain was sin-binned for a blatant professional foul on Habana, it looked like the Boks would pull away again. But only a marginal forward-pass halted another Scottish assault after Stuart Hogg set off on one of his mesmerising runs.
Weir took over kicking duties to nail a penalty for the Scots, but two more efforts from Pollard took a losing bonus-point out of the Dark Blues' reach.
The Scots were running on empty by the time Habana collected from Adriann Strauss before squeezing over in the corner, although Pollard missed with the conversion.