Potchefstroom, South Africa, Jan 26 : South Africa narrowly avoided an historic home series whitewash at the hands of New Zealand when Ryan McLaren hit a six off the last ball for a scrambling one-wicket win in the final one-day international.
McLaren scooped over fine leg for maximum when South Africa needed three off the last delivery to win the third match and stave off the first ODI series sweep ever against it at home.
Having crashed to successive innings defeats in the two-test series in a painful reality check, New Zealand's young and much-criticized team ended its monthlong tour just a ball away from achieving what no other country had done in 20 years of one-day internationals in South Africa.
South Africa had never lost an ODI series at home without taking at least one game, and came perilously close to ending that run at Senwes Park.
Dale Steyn was dismissed off the second last ball to leave McLaren to win the game right at the death with his unorthodox shot off James Franklin, taking the Proteas to 264-9 and squeezing past New Zealand's 260-9.
"I'm getting older. It's nerve-racking,'' South Africa stand-in captain Faf du Plessis said.
New Zealand still won the series 2-1 for its first ODI series success in South Africa and a convincing turnaround after being utterly dominated in the tests.
''(I'm) incredibly proud, this young team has shown their fighting characteristics,'' Black Caps skipper Brendon McCullum said. ``Especially after the test series which was a tough couple of weeks for us. To come away with the spoils was incredibly satisfying ... and something we'll remember.''
As had happened in both previous games, South Africa was in control and then lost its way in Potchefstroom to allow the canny New Zealand team to take advantage.
This time, however, the young Proteas lineup - without the likes of AB de Villiers, Jacques Kallis and Hashim Amla - found their nerve when it counted right at the end.
The team was also put in position by an old hand, as former limited overs skipper Graeme Smith's 116 and 10th ODI century took the South Africans to the brink before the nervous end.
"It was relieving for us to get over the line tonight,'' Smith said, praising McCullum and his team for its fightback following the tests. "They've played superbly this series. They've outplayed us.''
Earlier, Lonwabo Tsotsobe took 4-45 for South Africa and McLaren 4-52, but New Zealand rallied from 68-4 and 129-5 to post a competitive total on a scorching hot day in South Africa's north west.
Colin Munro made 57 for a maiden ODI half-century, Grant Elliott got 54 and Franklin, who was nearly the match-winner with bat and ball for New Zealand, battered a late 53 not out to lift the Kiwis past 250 when it appeared they might not make 220 on a good batting pitch.
South Africa's bowlers had veered off course with 28 extras and 17 wides to allow the New Zealand middle order to cash in as the home team's one-day performances continued to be far off the high standards they set in the five-day game earlier in the month.
But New Zealand also showed an ability to outmaneuver the South Africans on regular occasions, first escaping to post a competitive score and then pulling the Proteas back after Smith had led them to a seemingly invincible position.
In its chase, South Africa suddenly slid from 165-3 to 229-6, when Smith holed out to long on, and New Zealand forced out Rory Kleinveldt and Aaron Phangiso cheaply to leave the Proteas needing eight off the last over.
Steyn lofted a heave to midwicket off the fifth ball to be caught by Grant Elliott, but McLaren shuffled across his stumps and swung a short ball from Franklin into the crowd behind him.
Despite the narrow loss, McCullum's Black Caps team would head home to face England upbeat after being down in the dumps just over a week ago.
"We really responded well in this one-day series,'' McCullum said. ``It's an incredibly happy bunch of guys. We know we're heading in the right direction.''