Joe Root’s eighth one-day century was in vain as South Africa beat England by one wicket to level the ODI series 2-2.
The Yorkshire batsman scored 109 off 124 balls as England recovered from 108-6 to post 262 all out.
England looked to be heading for victory when they reduced South Africa to 143-5, with AB de Villiers brilliantly run out by Chris Woakes.
But Chris Morris hit a superb 62 from 38 balls as South Africa reached the target with 16 balls to spare.
Morris was bowled with the penultimate ball of the match to set up a dramatic finish, but Imran Tahir – who had earlier starred with three wickets – hit Adil Rashid for four to seal victory.
England must now beat South Africa in Cape Town on Sunday to clinch their third win in four ODI series.
Million-dollar Morris hits the jackpot
It was an extraordinary, perhaps career-defining knock from 28-year-old Morris, who came in at number eight with a highest score of just 12 to his name from nine previous ODIs.
Last week Morris was bought for 70 million rupees (£707,882, or $1,027,607) by the Delhi Daredevils at the Indian Premier League auction and he underlined his considerable value in limited-overs cricket here with a breathtaking exhibition of clean ball-striking.
Having been dropped by Rashid on 14, the million-dollar man cashed in, bludgeoning four sixes into the thin highveldt air to guide his team to the brink of victory before Rashid finally removed him with a googly.
It was a masterclass in seizing the initiative, with South Africa having looked second favourites for much of the chase.
Stuart Broad removed Hashim Amla in the first over and Ben Stokes bowled the in-form Quinton de Kock before Woakes – dropped for England’s World Twenty20 squad – proved a point with the wicket of Faf du Plessis and the run-out of the talismanic De Villiers.
Farhaan Behardien and David Wiese briefly stemmed England’s momentum with a partnership of 48, but when they were out in quick succession, followed by Kagiso Rabada to leave the hosts 210-8, an England series win looked inevitable.
Redoubtable Root leads recovery
That England were able to get up to a competitive total after a nightmarish middle-order collapse owed much to another innings of supreme talent and maturity from 25-year-old Root.
Having come to the crease at 18-1 after Jason Roy was caught at fine leg, the Yorkshire batsman put on 69 with Hales, then had to watch from the other end as England’s innings crumbled.
When the sixth wicket fell, Root had just 38 and was not batting with his customary fluency, but his response to adversity solidified his burgeoning reputation as England’s man for a crisis in all formats.
Having reached his fifty off a relatively leisurely 74 balls, he cut loose – targeting all-rounders Morris and Wiese and scoring with particular abandon in front of square on the leg side – as he raced through the second half of his century in just 45 deliveries.
Root was aided by two valuable lower-order contributions from Woakes and Rashid.
Woakes provided the bulk of the support, contributing 33 in a partnership of 95 before gloving Rabada behind, while Rashid belted 39 from 26 balls after joining Root late in his innings.
Hales heave sparks England collapse
England were going along nicely at 87-1, with Alex Hales recording his fourth consecutive half-century of the series.
But the ball after bringing up his fifty, he slog-swept Tahir straight down the throat of deep midwicket to spark a collapse of five wickets for 21 runs in 40 balls.
Captain Eoin Morgan continued his run of disappointing scores when he somehow chopped a Tahir long hop to point for just two.
And Stokes perished two balls later, poking at a Tahir googly and brilliantly caught by Hashim Amla at slip.
Jos Buttler suffered his second failure in a row, top-edging on to his helmet to offer a caught-and-bowled to Kyle Abbott.
And when Moeen edged Abbott to first slip, England had collapsed to 108-6.
What they said
England captain Eoin Morgan: “At halfway it was South Africa’s game to lose – we were 30 or 40 runs short even though Joe Root was magnificent. I’m surprised, with the way we’re playing, it’s taken us this long to fall short with the bat.
“We took wickets, which is a big improvement on the last game, and it was our game to win at the end. The bowlers bowled out of their skin and the most disappointing thing is that we had chances. To see that fight is really positive.”
South Africa captain AB de Villiers: “We had opportunities to bowl them out for 150. Unfortunately we missed out on that, but I was still very happy with 260 which I thought was very chaseable.
“We could have made it easier but Chris Morris and the guys batting with him at the end were fantastic.
“We were a bit naughty with my run out and a couple of other wickets were soft but England played well to get back into the game. I am just happy to take it to Cape Town.”