|South Africa (21) 27|
|Tries: Hougaard, Pollard 2 Cons: Pollard 3 Pens: Pollard, Lambie|
|New Zealand (13) 25|
|Tries: Fekitoa, B Smith, Coles Cons: Barrett 2 Pens: Barrett 2|
South Africa ended world champions New Zealand's 22-match unbeaten run with a thrilling victory in Johannesburg.
Patrick Lambie landed a 55m penalty with two minutes remaining to clinch a gripping Rugby Championship Test match.
The Springboks led by 11 points just after half-time but Dane Coles' 71st-minute try put the visitors ahead, only for Lambie to snatch the win.
The defeat was the first for the All Blacks in 23 matches since they lost to England at Twickenham in December 2012.
New Zealand have lost just twice in 38 matches since winning the World Cup in 2011, while South Africa went into the match at Ellis Park with only one win in their last 10 meetings with the All Blacks.
Handre Pollard scored 19 points for the hosts, converting both of his two first-half tries as well as Francois Hougaard's opener.
|2014 Rugby Championship|
|16 August: Australia 12-12 New Zealand, South Africa 13-6 Argentina||13 September: New Zealand 14-10 South Africa, Australia 32-25 Argentina|
|23 August: New Zealand 51-20 Australia, Argentina 31-33 South Africa||27 September: South Africa 28-10 Australia, Argentina 13-34 New Zealand|
|6 September: New Zealand 28-9 Argentina, Australia 24-23 South Africa||4 October: South Africa 27-25 New Zealand, Argentina v Australia|
Malaki Fekitoa went over for the first All Blacks try, but the home side led 21-13 at the break.
Pollard kicked a penalty after half-time to put South Africa 24-13 ahead, but this served as a prelude to a stirring comeback from New Zealand.
A try from winger Ben Smith was converted by Beauden Barrett to reduce the gap to four points, and this year's Rugby Championship winners were ahead when Coles crashed over in the corner.
But Barrett missed the conversion, which meant that Lambie had a chance to retake the lead when Liam Messam's challenge on Schalke Burger resulted in a penalty on 78 minutes.
|McCaw closing in on O'Driscoll's record|
|Richie McCaw's 134 internationals comprise 133 Tests against other countries, and one appearance against the Barbarians. He trails only Ireland's Brian O'Driscoll (141 Tests) and Australia's George Gregan (139) in the all-time list.|
The substitute fly-half nervelessly slotted the kick over from just inside his own half, giving his side a lead they held to deny All Black captain Richie McCaw a win on his record-breaking 134th international appearance for his country.
The result was the first defeat for McCaw's side in 18 matches since the start of the four-team Rugby Championship in 2012.
South Africa coach Heyneke Meyer: "All credit to Pat, it was an unbelievable kick under huge pressure.
"I have been involved in rugby for 30 years and always wondered what it felt like to beat the All Blacks."
New Zealand coach Steve Hansen: "I have no problem with (referee Wayne) Barnes giving the penalty, I don't think there was intention to hit him high, but he did.
"It was a great game of rugby and could have gone either way, but my heart tells me the Boks deserved it today."
South Africa: Le Roux, Hendricks, Serfontein, De Villiers (capt), Habana, Pollard, Hougaard; J du Plessis, B du Plessis, Mtawarira, Matfield, Etzebeth, Vermeulen, Mohoje, Coetzee.
Replacements: Burger for Mohoje (49), Strauss for B Du Plessis (52), Pietersen for Hendricks (57), Lambie for Pollard (62), Botha for Etzebeth (62), Van der Merwe for J Du Plessis (62), Reinach for Hougaard (66), Nyakane for Mtawarira (72).
New Zealand: Dagg; B Smith, C Smith, Fekitoa, Savea; Barrett, A Smith; O Franks, Mealamu, Moody, Whitelock, Thrush, Reid, McCaw (capt), Kaino.
Replacements: Messam for Thrush (48), Coles for Mealamu (48), Franks for Moody (h-t), Faumina for O Franks (57), Luatua for Kaino (60), Kerr-Barlow for A Smith (65), Crotty for C Smith (73), Slade for Kerr-Barlow (74).