Martin Guptill returned from illness to hit a four off the last ball and claim a brilliant match-winning century and series-levelling victory for New Zealand in the second of three Twenty20s against South Africa on Sunday.

With Guptill on 97, New Zealand needed four off the last ball to win and the opener scooped a low full toss from Rory Kleinveldt over the cover fielders and to the rope for a dramatic victory.

Having recovered from a stomach complaint that kept him out of New Zealand’s heavy loss in the first game, Guptill clobbered six sixes in his 101 not out from 69 balls to better South Africa’s challenging 165-5 and earn the Black Caps an eight-wicket win at Buffalo Park.

New Zealand reached 169-2 after its target was readjusted because of a floodlight delay earlier in the game that reduced it to 19 overs per side.

Guptill shared a 76-run opening partnership with Rob Nicol (25) and a 73-run stand with captain Brendon McCullum (17), but he completely dominated both of those and New Zealand’s entire innings, timing his chase just right in the thrilling last-ball win.

“I feel a whole lot better than two days ago,” Guptill said after having spent the last few days confined to his bedroom with illness.

South Africa captain Faf du Plessis and opening batsman Henry Davids earlier made half—centuries for the home team to take it to a strong total and give it a good chance to wrap up the three—game T20 series with a match to spare.

But Guptill’s first century in T20 internationals ensured the Black Caps were still fighting ahead of the series decider down the coast in Port Elizabeth on Wednesday.

More In: Sport | Cricket