Port Elizabeth, South Africa:
The victory gave England a two-nil lead in the five-match series after a game where batsmen from both sides struggled to play fluently on a slow pitch.
South Africa made 262 for seven and England needed a late flurry of strokes by Jos Buttler and Moeen Ali to reach the target in 46.2 overs.
England captain Eoin Morgan praised his players for adapting to conditions that were much-changed from those in Wednesday's first match at Bloemfontein which they won in a high-scoring clash.
"They were completely different conditions," said Morgan. "That is what has impressed me most. The challenge was adapting to conditions. Alex Hales was magnificent."
Captain AB de Villiers top-scored for South Africa with an unusually sedate 73, while Hales played a crucial anchor role for England before he was fifth man out for 99.
Hales and Joe Root (38) put on 97 for the second wicket and made sure England were always up with the required run rate.
"They managed it very well and set it up for Jos Buttler, who played a magnificent knock," said De Villiers.
Hales looked set for his second one-day international hundred before he gloved an attempted pull shot against Kyle Abbott to wicketkeeper Quinton de Kock with his side still 61 runs away from their target.
Buttler, who made a century in Bloemfontein, hit three boundaries in an over from Abbott, who finished with three for 58.
Then he put the issue beyond doubt by hitting three sixes off successive balls from leg-spinner Imran Tahir. He made 48 not out off 28 balls, while Ali was unbeaten on 21 off 15 balls.
A double strike early in the last ten overs of the South African innings prevented the hosts from making a bigger total.
De Villiers and JP Duminy were dismissed in the space of three balls after sharing a 107-run fourth wicket partnership.
The pair were threatening to go an all-out assault when De Villiers was superbly caught in the deep by a running, diving Chris Jordan off Ben Stokes.
In the next over Duminy was leg before wicket to left-arm opening bowler Reece Topley for 47.
"We were about 20 or 30 runs short," said De Villiers. "I tried to pick it up at the end but then I got out and we lost a couple more wickets."
De Villiers said his players felt "a little hard done by" after decisions went against Duminy and Rossouw, with South Africa having no more reviews after an earlier failed review by De Kock.
The normally free-scoring De Villiers took 72 balls to reach his slowest one-day international half-century in eight years, with just three fours, two of them from reverse sweeps.
De Villiers edged another four and seemed finally to be taking control when he pulled Jordan for a six, only to fall in the next over. He faced a total of 91 balls.
Duminy hit only two fours in a 66-ball innings.
The tall Topley took four for 50, the best figures of his seven-match one-day international career.
Stokes took two for 54 but England's two slow bowlers, leg-spinner Adil Rashid and off-spinner Moeen Ali, were mainly responsible for South Africa's innings becoming becalmed in the middle overs.
Both bowled their allocation of ten overs in single spells and they conceded a total of only 84 runs.
By contrast, England did not allow South African leg-spinner Imran Tahir to settle. He conceded 66 runs in four separate spells.