New Zealand secured their first ever series win on South African soil on Tuesday as they beat the Proteas by 27 runs in the second ODI in Kimberley thanks to some abject running between the wickets.

The Black Caps posted 279 for eight and while it was a stiff challenge, the Proteas seemed on track to reach it. But five run outs, equal worst in terms of records, scuppered the hosts' chances and they were all out for 252 in the 50th over.

Kane Williamson batted for nearly the entire Kiwi innings, and overcame cramps in the 35-degree heat, to post his best ODI knock of 145 not out, as the Proteas dominated the early stages but could not prevent a leaking of runs in the closing overs.

Martin Guptill was the first of the Kiwis to fall, recording his second consecutive duck. He lashed at a rising Rory Kleinveldt delivery and tamely steered it to Faf du Plessis at point without a run on the board.

Williamson then joined BJ Watling in the middle and the two struggled to get the scoring rate going. After 10 overs they had scored only 19 runs, with Lonwabo Tsotsobe doing particularly well to keep the runs to a minimum.

The pressure finally caught up to Watling as he failed for the first time in four innings on this tour. He was dismissed for 12, facing 33 deliveries, when he was trapped plumb in front by Morne Morkel.

Williamson then put his foot on the gas though, and pushed the scoring rate up to four with some delightful boundary shots. After 17 overs, at drinks, he sat on 44, including eight boundaries, while the total had reached 63 for two.

Williamson reached his half century at a strike rate over 80, and Grant Elliott did well at the other end. Elliott was gutted to fall two runs short of his half century, caught behind off Kleinveldt in the 34th over. Williamson was on 95 at the time, and the next over saw him bring up his third ODI century in fine style.

Brendon McCullum then came in and soon freed his arms, hitting Morkel back over his head for six on the back of a boundary over long on. The lanky fast bowler retaliated with a straight yorker and skittled the Kiwi skipper's leg stump, the score 188 for four.

Debutant Colin Munro, his third debut of the tour and now a Black Cap in all formats, could only add nine to the tally before catching a leading edge off Tsotsobe, which saw Colin Ingram run in from long on to take the catch, diving forward.

The rot continued a few runs later as Jimmy Neesham was run out for five via a Du Plessis direct hit. The duo decided to risk going for a single, but considering Williamson's stiff hamstring, it was a suicidal effort.

Williamson was superb at the death though, and he and Kyle Mills made sure to push the score to the Black Caps' sixth-highest ODI score.

The Proteas started brightly and soon reached the 30s, with Quinton de Kock showing his attacking style. The 20-year-old tried one show too many though, and was bowled by Kyle Mills for 25, the overall score on 38.

Graeme Smith and Colin Ingram then did a great job of steadying the knock, putting on 129 together as both made half centuries. Smith was the grittier of the two, making 66 off 75 balls before being run out off a great boundary throw by Franklin.

Du Plessis then came in and was out via run out too, also diving to make his ground but falling short. The umpire put the finger up immediately, just as he had for Smith, and the Proteas were suddenly three down for 174.

Things then got even tighter when Ingram departed in the 35th over, having scored 79. This left two new batsmen in the middle, inexperienced ones at that. David Miller, with a ton of pressure on him, became the third man to be run out, having made only 14.

This left Farhaan Behardien and Ryan McLaren needing to go at nine to the over with seven remaining. McLaren's poor day, after his expensive bowling, continued as he holed out to mid on off Franklin for two, the Proteas still needing 65 off 36 balls.

Astonishingly, a fourth run out was added to the tally as Kleinveldt failed to slide his bat home. He tried to, but his bat got stuck in the turf and he was out even though he would have been safe otherwise.

Things reached farcical proportions when a fifth run out was added, again with Guptill doing the job. The batsmen tried to get the second, but the fielder rocketed the ball in from the boundary and Behardien was well short and out for 31.

A sixth run out was nearly on the cards as Morne Morkel was lazy in getting home, but he just managed to ground his bat. As it was, Neesham bowled Tsotsobe with the first ball of the final over to end the match.

The third and final ODI will be played in Potchefstroom on Friday.