England survived a late collapse to square the series when they beat South Africa by two wickets in the third and final one-day international at the Wanderers Stadium on Sunday.
England were cruising to victory at 232 for four after leg-spinner Adil Rashid and his fellow slow bowlers restricted South Africa to 256 for seven after they were sent in to bat.
But fast bowler Lungi Ngidi, who had endured a horror start to the innings, struck three times in quick succession as England lost four wickets for 20 runs before Moeen Ali got the winning runs.
"We bowled really well today," said England captain Eoin Morgan.
"We probably had the best of the conditions. It was our best performance in the field and with the ball." Morgan said he would have liked to finish with a "commanding" win. "It was disappointing to limp over the line like that," he said.
South African captain Quinton de Kock praised the energy his inexperienced team had shown in the two completed matches, which were shared 1-1.
"We had a bit of a sniff but it was still a loss," he said of Sunday's game. "But it was pretty cool to make it tough for the English side."
Man of the match Rashid, playing in his 100th one-day international but in his only appearance in the series, took three for 51, including the key wickets of Temba Bavuma and De Kock, who made 69.
After being under covers throughout Saturday because of heavy rain, the pitch helped the bowlers in South Africa's innings.
There was movement through the air and off the surface for the new-ball bowlers, while offering turn for the spinners.
Brief scores: South Africa 256/7 in 50 overs (David Miller 69*, de Kock 69; Adil Rashid 3/51) lost to England 257/8 in 43.2 overs (Joe Denly 66, Joe Root 49, Jonny Bairstow 43) by two wickets.