Vernon Philander took five wickets as South Africa replaced England as the world's number one Test side with a 51-run win in the third Test at Lord's on Monday.
England set 346 for victory, were dismissed for 294 on Monday's final day as South Africa took the three-match series 2-0.
Man-of-the-match Philander wrapped up the contest with two wickets in two balls to finish with five for 30 after Matt Prior had threatened to lead England to an improbable victory with a dashing 73.
South Africa, who won the first Test at The Oval by an innings and 12 runs before the second Test at a draw at Headingley, only had to avoid defeat at Lord's to replace England at the top of the International Cricket Council's world Test rankings.
History was against England as the most they had ever made in the fourth innings to win a Test was the 332 for seven they posted against Australia at Melbourne back in 1928/29.
Seam bowler Philander had removed England captain Andrew Strauss, in his 100th Test, and fellow left-handed opener Alastair Cook late Sunday to reduce the hosts to 16 for two at the fourth day's close.
Philander struck again early Monday when he had Ian Bell caught, at the second attempt, for his overnight score of four by Proteas captain Graeme Smith at first slip.
The last thing England needed then was a run out but confusion between Jonathan Trott and James Taylor over a fourth run saw the latter dismissed after Hashim Amla's throw was relayed by Dale Steyn to wicket-keeper AB de Villiers.
Jonathan Bairstow, who made a gallant 95 after coming in at 54 for four in the first innings having replaced the dropped Kevin Pietersen, walked out to bat Monday with England in an even worse position at 45 for four.
But he showed his class with several boundaries off fast bowler Steyn, the best a straight drive down the ground.
However, shortly after lunch, an entertaining partnership of 89 ended when Bairstow played back to a low delivery from leg-spinner Imran Tahir and was bowled for 54 off just 47 balls including eight boundaries.
And 134 for five became 146 for six when Trott, playing away from his body, was brilliantly caught by second slip Kallis off Steyn for 63 after more than three-and-a-half hours at the crease.
Left-handed batsman Stuart Broad pulled Steyn for six but a stand of 62 with Prior ended when, on 37, he hooked a Jacques Kallis bouncer to Amla at long leg.
At tea, England were 221 for seven, still needing a further 125 runs for victory, with Prior 35 not out and Swann 12 not out.
England then scored rapidly with Swann going down the pitch to drive Tahir for six over long-on and hooking Kallis for another impressive six.
Prior meanwhile had gone to his own fifty in 107 balls with five fours and he made sure the attack continued by sweeping Tahir to the boundary.
Another run out derailed England's charge, Tahir gathering Jacques Rudolph's wild throw to leave Swann, whose 41 featured two sixes and five fours, just short of his ground.
Together with Prior, he'd put on 74 in 66 balls but England were now 282 for eight.
Prior, on 67, was reprieved when he holed out to JP Duminy off Morne Morkel only for replays to indicate a no-ball.
And he was still on 67 when he survived a close stumping chance off Tahir.
But on 73 there was no doubt when he edged Philander, armed with the new ball to Smith and next ball the all-rounder, who also made valuable runs, had last man Steven Finn held at second slip by Kallis.