(CNN) -- South Africa snatched a 2-0 series victory against the British and Irish Lions after winning a thrilling second Test 28-25 in Pretoria on Saturday.
South Africa's Jaque Fourie lunges over the line to score a vital try in his side's series-clinching victory.
Replacement Morne Steyn kicked the winning penalty from near the halfway line at the high-altitude at Loftus Versfeld Stadium to give the world champions an unlikely come-from-behind victory.
The tourists had come out all guns blazing after Springboks flanker Schalk Burger was sin-binned for a nasty eye-gouge in the opening minute, and led 16-8 at the half-time interval.
The Lions were 19-8 ahead with only 19 minutes to play, but South Africa took the lead after a burst of individual brilliance from winger Bryan Habana and a controversial try out wide by substitute Jaque Fourie. Beginner's guide to the Lions.
Steyn added the extras to make it 25-22 after the video referee took several minutes before ruling that Fourie had not stepped into touch before lunging over to dot the ball down.
Stephen Jones leveled the scores with his fifth penalty in the 77th minute, but Steyn snatched the win with the last kick of the match after replacement Ronan O'Gara took out Fourie du Preez while the Springboks scrum-half was in the air.
Lions captain Paul O'Connell was heartbroken after the defeat.
"It was very disappointing the way it all panned out. We had a lot of injuries and I suppose they told," he told Sky Sports. "It was tough but we just didn't play enough in the second half. We were all over them when we played in the first half.
"I thought we did enough to get the draw and keep the series alive. Before I came on tour I knew we could do it -- but we needed to do it for 80 minutes. We did it for the second 40 last week and the first 40 this week."
The South Africans won the first Test 26-21 in Durban last weekend after holding off a late fightback by the Lions, but were on the back foot from the start this time around.
Burger, winning his 50th cap on return from a calf injury, was yellow-carded for an ugly incident in which he raked his fingers across the face of Luke Fitzgerald, and Jones gave the Lions an early lead from the resulting penalty.
Burger will face a disciplinary hearing on Sunday along with lock Bakkies Botha, who was reported for a dangerous charge on Lions prop Adam Jones early in the second half.
The match threatened to boil over when Lions center Brian O'Driscoll scuffled with Juan Smit, then the Lions took a 10-0 lead after only seven minutes when full-back Rob Kearney forced his way past Habana from Jones' superb offload following a blindside scrum move.
J.P. Pietersen reduced the deficit five minutes later as he cut inside from the right wing to link with scrum-half du Preez after a well-worked lineout, but fly-half Ruan Pienaar hit the post with his conversion attempt.
Jones landed another penalty in the 16th minute as the Springboks were caught offside at a ruck, then kicked a field-goal to make it 16-5.
However, Francois Steyn gave the Springboks some hope with the last action of the half when he converted a long-range penalty to make up for an earlier miss.
The Lions, whose scrum had improved out of sight following a pasting the previous week, lost front-rowers Gethin Jenkins and Adam Jones within five minutes of the restart. That meant there had to be uncontested scrums for the final half-hour, with lock Alun-Wyn Jones on for Jones.
Pienaar missed a penalty on 49 minutes, and Jones made him pay on 61 when he converted a three-pointer after South Africa captain John Smith was penalized.
Habana turned the game with an almost identical try to Pietersen's; this time the speedster cut in from the left to link with du Preez from a scrum.
Steyn, on for the hapless Pienaar, converted and then reduced the deficit to one point with a penalty in the 67th minute, but Jones was on target after Burger again infringed soon after.
O'Gara missed a vital tackle to give Fourie the chance to test the video referee in the 74th minute, and Steyn converted superbly from the sideline.
Jones took his tally to 20 points to level, but O'Gara's moment of madness allowed Steyn the chance to make history with a superb long-range kick under immense pressure.
In other international matches on Saturday, Australia beat France 22-6 in Sydney, while New Zealand defeated Italy 27-6 in Christchurch.