Jordie Barrett struck a 78th-minute penalty to snatch a 19-17 victory for New Zealand against South Africa in their Rugby Championship clash in Townsville.

This was the 100th Test between these sides and it lived up to the hype, with the match hanging in the balance throughout until the All Blacks finally secured the winning points to wrap up the match and with it the Rugby Championship title.

Both sides scored a try apiece with Will Jordan touching down for the All Blacks and Sbu Nkosi scoring for the Springboks. Fullback Barrett scored all New Zealand's other points courtesy of a conversion and four penalties, while Handre Pollard also added four three-pointers off the kicking tee for South Africa.

The Springboks came into this game under tremendous pressure after losing their two previous Tests against the Wallabies, but they delivered a much improved and more competitive performance this time around.

The All Blacks made a terrific start and three minutes into the game Codie Taylor tore the Springbok defence to shreds with a powerful carry from just inside his half. He was soon inside his opponents' territory where he offloaded to Jordan, who outpaced the cover defence on his way over the try line.

Shortly afterwards, the Springboks struck back in bizarre fashion. This after George Bridge failed to gather a routine bomb from Faf de Klerk inside his 22 and Nkosi pounced on the loose ball before crossing for an easy five-pointer.

Pollard's conversion attempt was wide of the mark but he made up for that miss when he landed a penalty in the 10th minute after Brodie Retallick was blown up for obstruction.

Two minutes later, the All Black second-row was penalised again and Pollard succeeded with a long-range goal-kick which meant the world champions were leading 11-7 by the 12th minute.

The next 20 minutes was a slugfest with the sides' giving their all to gain the ascendancy and their contrasting styles was evident throughout with the Boks' tactic of trying to slow proceedings down countered by the All Blacks' expansive style of play.

New Zealand managed to breach the Boks' defence on a couple of occasions but their execution was not of its usual high standards, although they managed to narrow the gap to a point when Barrett landed his first penalty on the half-hour mark.

Five minutes later, South Africa were reduced to 14 men when Nkosi was yellow-carded for a deliberate knock down deep inside his 22 and Barrett slotted the resulting penalty which gave his side a 13-11 lead at half-time.

The All Blacks were fastest out of the blocks after the interval and soon after the restart they were camped close to the Springboks' try line only for Nepo Laulala to knock on a short pass from TJ Perenara.

The attritional nature to the game continued with neither side giving an inch and we had to wait until the 58th minute for the first points of the half when Pollard added another penalty after foul play from the All Blacks deep inside their half.

That lead did not last long as on the hour-mark Barrett succeeded with his third penalty after the Boks strayed offside on defence.

The final quarter was a tense affair with South Africa upping the ante on attack and in the 67th minute they launched an attack from a lineout inside New Zealand's 22. When the All Blacks' strayed offside on defence, Pollard stepped up to add his fourth penalty which put his team in front for the last time.

There was plenty of end-to-end action as the game drew to a close but in the dying moments, Willie le Roux was blown up for holding onto the ball on the ground and Barrett held his nerve to slot the match-winning penalty.

New Zealand - Tries: Will Jordan. Conversions: Jordie Barrett. Penalties: Jordie Barrett (4).

South Africa - Tries: Sbu Nkosi. Penalties: Handre Pollard (4). Yellow cards: Sbu Nkosi.

New Zealand: 15 Jordie Barrett, 14 Will Jordan, 13 Rieko Ioane, 12 David Havili, 11 George Bridge, 10 Beauden Barrett, 9 TJ Perenara, 8 Ardie Savea (captain), 7 Ethan Blackadder, 6 Akira Ioane, 5 Scott Barrett, 4 Brodie Retallick, 3 Nepo Laulala, 2 Codie Taylor, 1 Joe Moody.
Replacements: 16 Samisoni Taukei’aho, 17 Karl Tu’inukuafe, 18 Ofa Tuungafasi, 19 Patrick Tuipulotu, 20 Hoskins Sotutu, 21 Brad Weber, 22 Damian McKenzie, 23 Quinn Tupaea.

South Africa: 15 Willie le Roux, 14 Sibusiso Nkosi, 13 Lukhanyo Am, 12 Damian de Allende, 11 Makazole Mapimpi, 10 Handré Pollard, 9 Francois de Klerk, 8 Duane Vermeulen, 7 Albertus Smith, 6 Siyamthanda Kolisi (captain), 5 Lood de Jager, 4 Eben Etzebeth, 3 Frans Malherbe, 2 Mbongeni Mbonambi, 1 Trevor Nyakane.
Replacements: 16 Malcolm Marx, 17 Steven Kitshoff, 18 Vincent Koch, 19 Francois Mostert, 20 Marco van Staden, 21 Herschel Jantjies, 22 Elton Jantjies, 23 Frans Steyn.

Referee: Luke Pearce
Assistant referees: Jordan Way and Reuben Keane
TMO: Damon Murphy