Defending champions South Africa were made to work extremely hard for a 17-16 win over Wales in a thrilling encounter in Wellington on Sunday.
Trailing 16-10 with fifteen minutes left, the Springboks had to dig deep to produce a try for replacement wing Francois Hougaard and clinch a hard-fought victory by the skin of their teeth.
Fiji still top Pool D on five points, but South Africa will now expect to win the "Group of Death."
After going behind in the early stages (South Africa led 10-6 at the break) Wales produced an outstanding hour of rugby to wrestle the lead back from the pool favourites.
Wales could not complain of a lack of opportunities as they had the lion's share of possession for the majority of the game.
Indeed, much of the pre-game talk centred around the Welsh pack's ability to match their opponents for physicality, but the men in red stood up to the challenge and have every reason to feel bitterly disappointed after coming mighty close to a memorable win.
South Africa looked dangerous in the first twenty minutes, but were outplayed for most of the remainder of the game bar a five-minute spell that produced the winning try.
Once the (mild) victory celebrations are done, the Springboks will also be sweating over the fitness of two key players after Jean de Villiers and Victor Matfield were forced off early with rib and hamstring injuries respectively.
South Africa were out of the blocks at a furious pace and took the lead after just three minutes when Frans Steyn scored in the corner. Jaque Fourie's initial break had put the Boks on the front foot before the ball was sent wide to Steyn, who smashed James Hook out the way to remind everyone of who the current world champions are.
After a shaky start, Wales settled down and Hook put them on the scoreboard after Pierre Spies was pinged for going off his feet.
The Welsh looked perplexed when referee Wayne Barnes denied them three more points when he adjudged that Hook's second penalty attempt had not crept inside the upright.
Morne Steyn extended South Africa's lead at the end of the first quarter by adding a penalty to his earlier conversion but Hook replied around the half-hour mark to leave the scores at 10-6. And so it remained until the break.
Wales spent the better part of 20 minutes camped in the Springbok half after the restart, dominating the battle for possession in the tight exchanges and impressing on attack.
Hook narrowed the gap to a single point on 50 minutes before number eight Toby Faletau crashed over at the end of an overlap to give Wales the lead going into the final quarter.
Shocked into action, the Springbok reply wasn't long in coming. Without their core leadership group (John Smit and Matfield were already off) they first made the brave decision to kick for touch rather than at goal from a penalty. True to form, they rumbled forward to open a gap on the side of a ruck through which Hougaard came flying to latch onto Fourie Du Preez's short pass and finish under the sticks.
Morne Steyn's conversion gave the champs a 17-16 lead.
Rhys Priestland missed a late drop and Hook couldn't find the mark with a penalty at the death, handing the Springboks an unconvincing victory.
Man of the match: A mention must go to Springbok openside Heinrich BrÃ¼ssow, who was a tackling machine. But Wales skipper Sam Warburton was the standout player with a phenomenal display at the breakdown.
Moment of the match: There can only be one: Francois Hougaard's try came at the end of South Africa's only real attack in the second half...one was all they needed.
Villain of the match: If you're Welsh, we know who you would pick, but we're not going down that road.
For South Africa:
Tries: F. Steyn, Hougaard
Cons: M. Steyn 2
Pen: M. Steyn
Pens: Hook 3
South Africa: 15 Frans Steyn, 14 JP Pietersen, 13 Jaque Fourie, 12 Jean de Villiers, 11 Bryan Habana, 10 MornÃ© Steyn, 9 Fourie du Preez, 8 Pierre Spies, 7 Schalk Burger, 6 Heinrich BrÃ¼ssow, 5 Victor Matfield, 4 Danie Rossouw, 3 Jannie du Plessis, 2 John Smit (c), 1 Tendai Mtawarira.
Replacements: 16 Bismarck du Plessis, 17 GurthrÃ¶ Steenkamp, 18 CJ van der Linde, 19 Johann Muller, 20 Willem Alberts, 21 Francois Hougaard, 22 Butch James.
Wales: 15 James Hook, 14 George North, 13 Jonathan Davies, 12 Jamie Roberts, 11 Shane Williams, 10 Rhys Priestland, 9 Mike Phillips, 8 Toby Faletau, 7 Sam Warburton (c), 6 Danny Lydiate, 5 Alun Wyn Jones, 4 Luke Charteris, 3 Adam Jones, 2 Huw Bennett, 1 Paul James
Replacements:16 Lloyd Burns, 17 Ryan Bevington, 18 Bradley Davies, 19 Andy Powell, 20 Tavis Knoyle, 21 Scott Williams, 22 Leigh Halfpenny.
Venue: Wellington Regional Stadium, Wellington
Referee: Wayne Barnes (England)
Assistant referees: George Clancy (Ireland), Vinny Munro (New Zealand)
Television match official: Matt Goddard (Australia)
By Ross Hastie