England clinched victory in the one-day international series with South Africa as the tourists fell three runs short of victory despite an excellent partnership from David Miller and Chris Morris.
The Proteas had earlier paid the price for five drops in the first half of England's innings, with two missed chances to dismiss Ben Stokes in his first two balls proving especially costly as he hit 11 fours and three sixes to score a 77-ball century.
Jos Buttler also contributed with an unbeaten 65 as England reached 330-6 at the Ageas Bowl, but, though Quinton de Kock was dismissed for 98, Miller (71 not out) and Morris (36 not out) had South Africa needing just seven runs off the final over of their chase.
However, Mark Wood's (0-48) excellent death bowling limited them to four runs in the last six balls to ensure the finale at Lord's will be a dead rubber.
Having seen Jason Roy (8) depart cheaply, England were fortunate to see Alex Hales (24) dropped at long-off, though he was dismissed in the next over.
Joe Root (39) was run out 15 balls later and Stokes was fortunate not to be following him back to the pavilion after Hashim Amla and De Kock dropped him off successive Keshav Maharaj (1-72) deliveries.
Captain Eoin Morgan was also dropped twice, but his stay at the crease finally came to an end the delivery after Stokes had brought up his 50.
Buttler survived a tight lbw review on eight and it was he and Stokes that did the most damage to the Proteas' cause.
After reaching 98 with a six over long-on, Stokes pulled for two to bring up his second ODI ton.
His exit to Maharaj did not stop Buttler from keeping the scoreboard ticking with utter disdain for the attack while receiving able support from Moeen Ali (33 off 19).
Fittingly it was Stokes who broke a useful opening stand of 56 between De Kock and Amla (24).
However, De Kock found another unsurprisingly able partner in AB de Villiers (52), as they put on 96 before the South Africa skipper became Liam Plunkett's (3-64) second victim.
De Kock hit 11 boundaries in a measured 103-ball knock but was denied a ton when he tickled Moeen (1-59) behind.
Miller and the surprisingly prolific Morris kept South Africa in contention and a penultimate over in which the expensive Jake Ball (0-81) went for 13 seemingly put them in pole position, only for Wood to swing the result England's way.