The visitors turned in a muscular performance, particularly in the second half after the Scots had led 10-8 at the interval.
However, for all the disappointment there was pride for home skipper Stuart Hogg who equalled the Scotland international tries record with a superb brace.
Here’s how the captain, and his Scotland team-mates rated in the penultimate match of the series.
Player ratings scale - 10: One of the best performances you've seen. 9: Outstanding. 8: Very good. 7: Good. 6: Average. 5: Poor, 4: Very poor. 3: A terrible day at the office. 2: Abysmal. 1: One of the worst performances you've seen.

5. Jamie Ritchie - 6
Moved to openside to accommodate Haining. A lively presence but was guilty of conceding too many penalties. Photo: Ross Parker - SNS Group / SRU

6. Matt Fagerson - 8
The Glasgow No 8 is unlikely to face much tougher tests but stuck to his task for the full 80. 8 Photo: Ian MacNicol

7. Ali Price - 6
Kept trying to spark the Scotland attack but was tough going against defensively sound opponents. Photo: Stu Forster

8. Finn Russell - 7
Architect of Scotland’s first try with a delightful cross kick. Always ready to take the game to South Africa but limited opportunities. Photo: Paul Devlin - SNS Group

