A valiant century from captain Graeme Smith wasn't enough to ensure South Africa a win in their crucial Champions Trophy match against England at Centurion on Sunday.
England's 22-run-win, their second in succession, ensured them a last four berth while ensuring the hosts' exit from the tournament.
Smith scored a superlative 141 (134 balls) but ran out of partners. His knock consisted of 16 glorious hits to the fence.
Chasing an improbable target of 324, South Africa were restricted to 301 for nine.
The hosts were off to a brisk start with Smith and Herschelle Gibbs putting on a run-a-ball 42.
Gibbs, in particular, looked aggressive during his 26-ball 22, his innings inclusive of three boundaries and a maximum.
However, the next five overs witnessed the hosts lose two crucial wickets, Gibbs holing out to Luke Wright at mid-on of James Anderson and more importantly, Jacques Kallis (12) being caught at deep square leg by Joe Denly of Stuart Broad.
South Africa 64 for two after 12 overs.
Smith, who completed his half-century and AB de Villiers (36) steadied the ship with a 78-run partnership for the third wicket but the latter's dismissal at a crucial juncture, caught by Dely at midwicket of Paul Collingwood, was a further jolt to the hosts' chances.
It was 143 for three after 26 overs and the South African innings slowed down considerably at this point.
Smith suddenly looked tentative and would have walked back to the pavilion had Shah not dropped a sitter of Collingwood at long-on with the South African captain at 83.
JP Duminy also survived two successive leg before appeals of Graham Onions as the hosts couldn't guide the ball to the boundary for 65 balls when Smith smashed Luke Wright past third man.
Smith hit a splendid boundary past point (of Collingwood) to reach his ninth one-day hundred, arguably his best knock.
The fourth-wicket yielded the home side 64 runs before Duminy (24) was cleaned up by Graeme Swann.
South Africa 206 for four after 37 overs, still needing 118 runs.
Mark Boucher (8) didn't last long, Anderson cleaning him up with a shortish delivery.
Albie Morkel (17) smashed a boundary and a six of successive deliveries from Broad to ease the pressure but with South Africa needing 69 of the final six overs, he was caught short of his ground following a Morgan throw.
Two balls later, Johan Botha (0) holed out to Onions at mid-off of Broad. Roelof van der Merwe (o) followed soon after and when Smith skied one to Shah at mid-on (of Broad) it was all over.
And though Dale Steyn (17 not out) regaled the crowd with a couple of boundaries, it was too little, too late.
Earlier, Owais Shah (98) missed a richly deserved century but a late cameo from Eoin Morgan (67) ensured England post a commanding 323 for eight in their second Group B match.
Shah was the batsman around whom England batting revolved and he was ably supported by crisis man Paul Collingwood (82) as the duo shared a 163-run partnership for the third wicket from 157 balls after they were reduced to 59 for two by the 13th over.
A late blitzkrieg from Morgan, whose 34-ball innings included five sixes and four fours, pushed England to 323 for eight, the highest score in the tournament so far, after they opted to bat first at a dry SuperSport Park.
England, who came into the tournament after suffering a 6-1 thrashing at the hands of Australia, thus continued their strong show having beaten Sri Lanka in their first match.
Coming together in the 13th over, Shah and Collingwood sent the South African bowlers for a leather hunt in the middle overs with a flurry of sixes as they took the score from 93 for two in the 20th over to 222 before the former was out in the 39th over.
Shah's blazing 98 included six hits over the ropes, two each off Albie Morkel and Roelof van Der Merwe, and one each off Dale Styne and Jean-Paul Duminy. He also hit five fours in his 89-ball innings.
Collingwood played the perfect foil for Shah by rotating strike with ones and occasional boundaries. His 94-ball innings was studded with six boundaries and a six.
For South Africa, left-arm pacer Wayne Parnell was the most successful bowler with 3/60. Johan Botha took two wickets for 56 while Jacques Kallis and dale Steyn got a wicket apiece.
England were off to a good start with Andrew Strauss (25) and Joe Denly (21) scoring boundaries at both ends and reaching 27 for no loss at the end of fifth over.
But two quick wickets saw England slumped to 59 for two by the 13th over.
First change bowler Jacques Kallis provided the breakthrough as Denly holed out to Jean-Paul Duminy at the deep in the last ball of the 10th over for a 25-ball 21.
Thirteen balls later, Strauss was on his way with wicketkeeper Mark Boucher effecting a stunning catch diving to his left after the England captain had nicked a wide delivery off Steyn.
Collingwood and Shah then steadied the England innings settling down first before launching themselves for some amazing strokes. Instead of slowing down, the duo pushed the run rate in the middle overs.