Jofra Archer’s career-best six for 40 after a rescue act with the bat from Dawid Malan and Jos Buttler ensured England ended their tour of South Africa with a consolatory victory. Archer had never before recorded a five-for in one-day internationals but his breakthroughs at crucial junctures helped England snap a five-match losing sequence in this format as they prevailed by 59 runs in Kimberley. England earlier lurched to 14 for three after losing the toss following Lungi Ngidi’s triple strike but Malan (118 off 114 balls) and Buttler (131 off 127) staged a remarkable recovery. The pair’s 232-run stand in 211 balls is England’s highest partnership for the fourth wicket and formed the backbone of the tourists’ 346 for seven, with 217 runs coming in a breathless last 20 overs. While South Africa lost wickets at regular intervals, Heinrich Klaasen threatened to set up a grandstand finish with a sparkling 80 off 62 balls. But with England desperate for a wicket as the target came down to 69 off the last 63 balls, Archer – who took one for 81 in his international comeback after a 22-month absence last Friday – was recalled and his slower ball did for Klaasen, with South Africa then subsiding to 287 all out in 43.1 overs. England lost the series 2-1 but avoided a second consecutive clean sweep, which looked a distinct possibility at the start of the day. South Africa captain Temba Bavuma was pleased, despite the defeat. “Very happy. We came in under a lot of pressure needing points for automatic World Cup qualification and we have done ourselves justice by edging closer to that,” he said. “We got the series win as well against a tough side like England. “We have challenged ourselves as to how we want to play and we keep saying that, that's my mantra. There is a lot of learnings and confidence we can take from that. “We are expressing themselves challenging different stages of the game and being positive, almost like England go about their cricket.” England's innings began wretchedly when Jason Roy prodded uncertainly to mid-off off Ngidi, who capitalised on early uneven bounce as Ben Duckett and Harry Brook got top and under edges to cross-batted shots. There were 52 dots in a powerplay which England ended on 20 for three while Buttler got off nought from his 14th ball, cutting away Marco Jansen for four, as he and Malan rebuilt with caution. Aiden Markram’s part-time spin offered respite from the seamers and Buttler gratefully tucked into the weak link. England reached three figures at the innings’ halfway point and Buttler brought up the 100-run stand with a monster 105-metre six off left-arm wrist-spinner Tabraiz Shamsi – five of his seven maximums came off the slower bowlers. Malan kickstarted the charge by joining Buttler in going past fifty with a slog sweep off Wayne Parnell for six, and won the race to a century. Moeen Ali hit four sixes in 41 off 23 balls as England finished well after their shaky start, before Archer then took over with the ball and finished celebrating his best figures in international cricket.