This was a case of roof justice for Wales. They allowed the rain to pour for four days on to the already cut-up turf to put South Africa off their running game after ignoring the visitors' pleas to close the sliding roof, and were beaten by their inability to hold on to the saturated ball at crucial times.
Arwel Thomas will take the blame following a succession of mistakes after he replaced Neil Jenkins at outhalf on the hour but Wales were behind at that stage despite a significant territorial advantage. They had played an expansive game, having chosen a defensive-looking team, only to concede possession regularly through handling errors.
For the second time in a week South Africa showed their capacity to absorb pressure and strike at the death. As stoppage time began yesterday the teams were tied at 13-13 with Thomas having missed a penalty and two dropped goals.
Thomas was brought on to provide inspiration. The Wales coach Graham Henry had been criticised for choosing Jenkins but was vindicated in a bruising, physical contest which saw the slight Wales full back Rhys Williams replaced after 19 minutes of buffeting.
Wales led 10-6 at half-time thanks to a trademark Gibbs try. The centre took a pass on the blind-side at pace and handed off Van der Westhuizen to score in the corner but Wales, for all their possession, struggled to create scoring opportunities.
They did, however, spend most of the third quarter attacking before Vos burst away and Van der Westhuizen scrambled through a rare gap from five yards.
At 13-10 down Henry's response was to replace Jenkins, whose five points took him to 996 in international rugby, with Thomas, whose first task was a 40metre penalty. He succeeded but it was downhill from there with the Wales back row slow to support him and the three-quarters showing signs of battle fatigue.
The fly-half ended up giving a meek impersonation of Jenkins and his misery was compounded in stoppage time when, after Andrews had helped himself to a Wales lineout on the home side's 22, Thomas gave away a penalty at a ruck under the posts which Braam van Straaten converted.
Thomas kicked the restart straight to Percy Montgomery whose clearance forced Wales to touch down.
Thomas's attempted quick drop-out was parried by the replacement Grant Esterhuizen, the Springboks drove to the line and Breyton Paulse scored after an arcing run.
"England on Saturday will be the acid test for us," said the Springboks' coach Harry Viljoen. "As soon as Wales refused to close the roof, we were determined to win. It was a matter of pride."
Scorers: Wales - Try: Gibbs. Conversion: N Jenkins. Penalties: N Jenkins, A Thomas. South Africa - Tries: Van der Westhuizen, Paulse. Conversions: Van Straaten 2. Penalties: Van Straaten 3.
Wales: R Williams (Cardiff; S Williams, Neath, 19min); G Thomas (Cardiff), Bateman (Northampton), Gibbs (Swansea), James (Llanelli); N Jenkins (Cardiff; A Thomas, Swansea, 60), Howley (Cardiff); Rogers (Cardiff; I Thomas, Ebbw Vale h-t), G Jenkins (Swansea; Lewis, Cardiff, 55), Morris (Swansea; John, Cardiff, 62), Gough (Newport), Wyatt (Llanelli), Budgett (Ebbw Vale), Charvis (Swansea), S Quinnell (Llanelli, capt).
South Africa: Paulse, Fleck, Van Straaten, Rossouw (Williams, 22); Montgomery, Van der Westhuizen; Kempson, Smit (Marais, 80), Meyer (Le Roux, 66), Van den Berg (AJ Venter, 56), Andrews, Krige, A Venter, Vos (capt).
Referee: S Walsh (New Zealand).