Ireland missed a chance to record their first-ever Test win in South Africa as the Springboks gave coach Jake White a victory in his first game in charge.
S Africa: 31 (11)
Tries: Botha 2, Julies, Wannenburg
Con: du Toit
Pens: du Toit 3
Ireland: 17 (11)
Pens: O'Gara 3
The Triple Crown holders led 14-11 early in the second half but South Africa stormed back to take command.
An early Bakkies Botha try was cancelled out by Shane Horgan's score to leave the sides level at half-time.
But Wayne Julies, Botha - with his second - and Pedro Wannenburg added further tries to deny Ireland.
Gaffie du Toit added 11 points with the boot to bolster the victory margin.
The Irish began with high hopes of securing only a second ever Test win against the Springboks.
But they were behind after barely two minutes as South Africa began in barnstorming fashion.
A simple move along the line found Botha with a huge gap in front of him, and the lock bounded into space, off Peter Stringer and through the remaining cover to score.
Du Toit was off target with the conversion, and Ireland weathered the early storm as O'Gara slotted a superb penalty in the ninth minute.
Du Toit restored South Africa's advantage with one of his own but Ireland drew level with a superb try in the 14th minute.
O'Driscoll drifted through a gap in midfield before drawing du Toit and sending Horgan over in the right corner with a pin-point pass.
O'Gara could not convert from wide out, but slotted a second penalty minutes later after a break from David Wallace to put Ireland ahead for the first time.
The hosts drew level with another du Toit penalty and twice almost breached the Ireland line in quick succession.
First Gordon D'Arcy scrambled away Jaco van der Westhuyzen's chip through before number eight Anthony Foley kept out Jacques Cronje's lunge for the line.
Ireland lost D'Arcy with a shoulder injury on the half-hour but with Kevin Maggs on in his place, might have grabbed a second try after another slashing O'Driscoll break.
Du Toit was narrowly short with a long-range penalty as the first half drew to a close with the sides locked at 11-11.
Botha scored two tries for South Africa
O'Gara's smart drop goal regained the lead for Ireland on the resumption only for the Springboks to snatch it back again with a second try.
Charges from centre Marius Joubert and Cronje took the hosts deep into Ireland's half before the ball was moved swiftly right to Julies, who beat O'Gara on the outside.
Five minutes later the visitors conceded a soft third try, under pressure at a line-out right on their own line.
Shane Byrne's throw missed its intended target - Paul O'Connell - and fell straight into the grateful hands of Botha, who plunged over for his second try.
Du Toit missed both conversions to leave Ireland only seven points adrift, and O'Gara's penalty brought them to within four with 17 minutes left.
But South Africa scored a fourth try when their pack demolished Ireland at a scrum and Wannenburg touched down after a fortuitous bounce.
Du Toit's conversion made it 28-17 and the full-back added another penalty late on to seal victory.
South Africa: G du Toit; B Paulse, M Joubert, W Julies, H Mentz; J van
der Westhuyzen, F du Preez; O Du Randt, J Smit, capt, E Andrews, B Botha, V Matfield, S Burger, P Wannenburg, J Cronje.
Replacements: H Shimange, CJ van der Linde, Q Davids, G Britz, B Conradie, J Fourie, B Russell.
Ireland: G Dempsey; S Horgan; G D'Arcy, B O'Driscoll, capt, G Murphy; R O'Gara, P Stringer; R Corrigan, S Byrne, J Hayes, M O'Kelly, P O'Connell, S Easterby, D Wallace, A Foley.
Replacements: F Sheahan, M Horan, D O'Callaghan, A Quinlan, D Humphreys, G Easterby, K Maggs.
Referee: Tony Spreadbury (RFU).