"All I asked of the boys was to give it their all and I am so proud of the way they played," said Mosese Rauluni, Fiji skipper.
"We came here with nothing to lose and they had all the pressure on them and we forced them to make mistakes.
"We had two upset results yesterday and we were hoping for another one today but it wasn't to be."
After a cracking start, Percy Montgomery missed an easy penalty after the Fiji scrum buckled under the experience of the Bok front-row, but Francois Steyn made amends with a 53-metre penalty after Fiji transgressed at a ruck.
The Springboks, having been awarded yet another penalty in kicking range, chose to kick to touch and from the ensuing ruck, Fourie du Preez fired out an inch-perfect pass for centre Jacque Fourie to cross unchallenged in the corner.
"All I asked of the boys was to give it their all and I am so proud of the way they played."
However Fiji were far from out of it, with impressive Number 8 Sisa Koyamaibole and Gloucester-bound openside flanker Akapusi Qera popping up everywhere, led with aplomb by effervescent scrum-half and captain Mosese Rauluni.
John Smith was the beneficiary of South Africa's powerful driving maul when he was driven over for a try in the 35th minute and the Springboks took a 13-3 lead into the break.
Bai kicked his second penalty early in the second-half after Bryan Habana was caught in possession, but the Boks responded immediately.
Lock Victor Matfield held off a tackler to offload to Pietersen for a simple run-in, and to make matters worse for Fiji, centre Seru Rabeni was sin-binned for a shot on Butch James.
Just as it looked like South Africa might run away with the game, an isolated Vilimoni Delasau spotted a half-chance, chipped ahead, and with Montgomery nowhere to be seen, pounced on his own kick for a try which Bai converted from the sideline.
Two minutes later, the irrepressible Rauluni broke the line to find Sireli Bobo steaming up in support and the winger had enough power to ride Fourie's tackle for a try Bai again converted to draw the scores level at 20-20.
Despite Montgomery hitting a penalty, Fiji had the chance to take the game from South Africa in the final quarter, but Seru Rabeni knocked on over the line and Pietersen came up with a magnificent try-saving tackle on Rawaqa in the corner.
The Boks made sure of the win with two late tries from Smit, who crashed over from a well-drilled rolling maul, and Butch James to break Fijian hearts of making the semi-finals for the first time.