England withstood a middle-order collapse to secure a nervy two-wicket win over South Africa at a raucous Johannesburg as their one-day international series finished all square at 1-1.
The recalled Adil Rashid marked his 100th ODI with three for 51 as a lacklustre South Africa were restricted to 256 for seven, a total indebted to innings of 69 from captain Quinton de Kock and David Miller, who finished unbeaten.
Jonny Bairstow's rampaging 43 from 23 deliveries allowed those below him to bat at their own tempo and there seemed to be no worries as Joe Denly (66) put on half-century stands with Joe Root (49) then Tom Banton (32).
A spectacular wobble inside the suffocating atmosphere of the Bullring saw England lurch from 232 for four to 252 for eight, but Moeen Ali's unbeaten 17 led the tourists to victory with 40 balls to spare.
England's first ODI win since the World Cup final last year ensured they remain unbeaten in a bilateral series in the 50-over format since the start of 2017 as South Africa were left feeling blue on Pink Day.
England, who wore a special pink-inspired kit to mark the occasion dedicated to raising awareness about breast cancer, handed an ODI debut to Saqib Mahmood, who curiously only bowled five overs.
However, the Lancashire paceman took one for 17 in an immaculate opening spell alongside Tom Curran as South Africa got off to a ponderous start, never really finding any momentum until Miller's 53-ball counter-punch.
Rashid proved his value in his first ODI since the World Cup final, making sure Rassie van der Dussen's peculiar let-off had little impact, while fellow spinner Moeen took one for 42 on his return to England duty.
Out went seam bowling pair Chris Woakes and Sam Curran and leg-spinner Matt Parkinson for the must-win clash as England decided to bowl first in overcast conditions, which soon gave way to sun for the remainder of the day.
At a venue renowned for bulging totals, South Africa had reached an anaemic 36 for one after 10 overs as Curran frequently befuddled De Kock while Mahmood brushed Reeza Hendricks' off-bail for his first ODI wicket.
Temba Bavuma seemingly burned a review after being adjudged lbw, ending a measured 66-run stand alongside De Kock, but the unavailability of UltraEdge had unforeseen consequences for England.
Amid some confusion, the umpires handed South Africa their review back, leading to a reprieve for Van der Dussen, who had been given out lbw off Rashid's next ball only for technology to show the ball would have missed leg stump.
England were incensed but Van der Dussen's lazy waft in the next over led to him being bowled by Moeen before De Kock perished, cleaned up after missing a massive heave off Rashid, who later had Andile Phehlukwayo lbw.
Rashid even had a hand in the run out of Beuran Hendricks before former Yorkshire team-mate David Miller injected some late impetus with some lusty strokes in a 45-ball fifty, after which he twice clubbed Chris Jordan into the stands in the final over as South Africa exceeded the 250-barrier.
Bairstow displayed none of the hesitancy South Africa's opening pair had made earlier, flaying Lungi Ngidi for 20 runs in the space of five balls, including two leg-side swipes that cleared the rope.
He continued to blaze a trail but his first mistake led to him mistiming Lutho Sipamla to midwicket while Jason Roy (21) top-edged Beuran Hendricks high into the air, with Ngidi taking a skier at short fine leg.
Eoin Morgan gave a return catch to the left-arm seamer for nine as England slipped from 61 without loss to 86 for three, but Bairstow's efforts meant Root and Denly had to take little risk as both batsmen settled into their routines.
The famous atmosphere inside the Wanderers died down only to rise again when Root tamely clipped to leg slip off left-arm wrist-spinner Tabraiz Shamsi.
Denly crunched back-to-back maximums off Shamsi to bring up his second half-century of the series before holing out with 25 runs still required.
Banton was caught behind three balls later while Curran and Rashid departed without making an impression, only for Moeen to settle matters in the 44th over.