England 257 for 8 (Denly 66, Hendricks 3-59, Ngidi 3-63) beat South Africa 256 for 7 (Miller 69*, de Kock 69, Rashid 3-51) by two wickets

England overcame a late collapse to share the one-day series spoils by denying South Africa victory on Pink Day for the second time in the event's seven-year history. Cruising at 232 for 4 after 36.3 overs, leaving just 25 runs required, the wicket of Joe Denly, holing out to deep extra cover, sparked a wobble of four wickets for 20 runs, but Moeen Ali - in his first international appearance in six months - provided the cool head required to see them over the line.

The hosts have now lost consecutive ODIs at the Wanderers, after being defeated by Pakistan last January. On both occasions, South Africa were unable to post a competitive enough total to defend, even though they fell just nine runs short of the average first innings score of 265, today.

Jason Roy and Jonny Bairstow's opening stand of 61 runs in 6.2 overs meant England got away early in the reply and Joe Root and Denly ensured South Africa could not catch them. Denly scored second his half-century of the series, to finish as England's highest run-scorer, and second overall.

But the match was won in the first half, where England's spinners made major breakthroughs and kept South Africa relatively quiet. Moeen, making his first England appearance since the first Ashes Test last August, Adil Rashid and Root bowled 27 overs between them, conceding 136 runs at just over five an over and took four wickets, leaving South Africa well short.

Under clearing skies, Eoin Morgan chose to bowl first and Tom Curran and debutant Saqib Mahmood justified that call. Their opening spells kept South Africa to 36 runs in the opening Powerplay, with Mahmood claiming his maiden wicket when he bowled Reeza Hendricks. South Africa's hopes of a recovery came from Quinton de Kock and Temba Bavuma, who injected energy into the innings. Their partnership reached a sprightly 53 off 58 balls before spin was introduced and they were stalled.

In a comical period of play, Rashid had an lbw appeal against Bavuma turned down and another, off his next ball, given out. Bavuma reviewed the decision, unsuccessfully. Though replays showed the ball was hitting the top of middle and leg stumps, UltraEdge was not working so, despite an obvious gap between Bavuma's bat and pad, technology could not confirm that he hadn't hit the ball. As a result, South Africa retained their review, which was used on the next ball when Rassie van der Dussen was given out to a Rashid googly and informed he could refer the decision. Van der Dussen survived, but only for seven more balls before he was bowled by Moeen. South Africa were reduced to 94 for 3 and de Kock had the responsibility of anchoring the innings.

ALSO READ: DRS process under scrutiny after UltraEdge malfunction

The South Africa captain brought up his 25th ODI half-century and formed a solid 46-run stand with Jon-Jon Smuts but was also undone by spin. Rashid took out his leg stump with a delivery that gripped and spun as de Kock tried to slog. That transferred the main job to David Miller, who had yet to bat in this series, but had 19.3 overs to show what he could do.

Miller was not immediately able to get going and was involved in the run-outs of Smuts and Beuran Hendricks but led a strong finish. South Africa scored 78 runs in the last 10 overs, which included 48 in the last five, as Miller took a particular liking to Chris Jordan. He hit Jordan for 34 runs off the 16 balls he faced from, including a trio of sixes over midwicket.

What Miller could do, England's openers could do better and they were merciless against an out-of-rhythm Lungi Ngidi, whose first two overs cost 29 runs. Ngidi was punished for anything too short while on the other end, Beuran Hendricks paid the price for overpitching, then going short and then trying the slower ball. Bairstow did the majority of the big-hitting and raced to 43 off 23 balls and could have brought the afternoon to an early end if he hadn't popped a simple catch to midwicket, giving Lutho Sipamla his second ODI wicket. Roy also caused his own downfall when, in the next over, he pulled Hendricks to short fine leg.

South Africa's hopes of a comeback swelled with Morgan popped a catch back to Hendricks in his follow-through and England were 86 for 3 but Root quickly squashed that. His 76-run stand with Denly kept England ticking along and appeared to blunt the Tabraiz Shamsi threat until Root was caught at leg slip, trying to turn Shamsi around the corner, on 49. England still needed 95 runs when Root was dismissed, but with almost half their overs left to bat, they were not in any realistic trouble.

Denly, whose leg-side game was particularly strong and brought him 55 off his 66 runs, took them to 25 runs of the win. That was close enough so that South Africa's late surge of 4 for 20 was nothing more than a false dawn. In much the same way as their win in the first Test, and their victory in the first ODI, South Africa's next step is to find consistency, while England have proved themselves more than capable of playing catch up.