The Lions launched a late fightback to beat the Royal XV and avoid what would have been their first defeat in the opening tour match since 1971.
Two tries in quick succession, from Wilhelm Koch and Rayno Barnes, helped the hosts take a shock 18-3 lead.
Tommy Bowe's converted try made it 18-10 at the break before a Ronan O'Gara penalty cut the lead to five.
Bees Roux scored for the hosts but late tries from Lee Byrne, Alun Wyn Jones and O'Gara saw the Lions home.
A sparse crowd at the Royal Bafokeng Sports Palace in Rustenberg - the Super 14 final was taking place in nearby Pretoria - saw the Lions make a raft of mistakes and struggle to gel in the first hour.
An embarrassing defeat was on the cards - for the first time in a Lions tour opener since losing 15-11 to the Queensland Reds in 1971 - to an equally scratch side made up of players from the second tier of South African rugby.
It was not all bad for the Lions and Jamie Roberts and Lee Byrne both turned in fine performances despite the rocky display from the team as a unit, and in the end the Lions' greater fitness saw them run in three late tries to avoid faces as red as their shirts.
O'Gara kicked a seventh-minute penalty to give the Lions the lead but Naas Olivier soon levelled with a penalty of his own.
The Lions' attempts to get their game going were hampered by centre Keith Earls' inability to hang on to the ball.
The 21-year-old was clearly struggling with nerves and when he dropped a high kick in his own 22 it gave the hosts great field position.
They attacked from a ruck, great hands from Hanno Coetzee put Koch through a gap and the Royal XV captain had the pace and power to just make it to the line.
It soon went from bad to worse for the visitors, as Barnes burst through the middle of a maul to add a second try.
The maul, so rare a sight under the experimental laws (ELVs) that had been in effect for the past year, was making a welcome reappearance as Saturday's game was played under the definitive new laws which prohibit players from dragging down the maul, contrary to the system in use under the trial laws.
Royal XV fly-half Olivier converted the first try and slotted a penalty in between the two tries to give the hosts an unexpected 18-3 lead with less than half an hour on the clock.
As the Lions tried to get back on terms they elected not to kick for goal when awarded penalties and after kicking into the corner once more they finally scored their first try of the tour.
They failed to maul their way over from the line-out but fed the ball into midfield and Bowe popped up to take O'Gara's inside pass and motor over under the posts.
Ireland fly-half O'Gara slotted the conversion and despite a difficult opening 40 minutes, the Lions went in only eight points adrift at the break.
O'Gara trimmed the gap with a penalty two minutes after the restart and with Olivier then missing for the hosts, the Lions approached the last 20 minutes trailing by five points.
By now the tourists had taken charge but despite coming close to scoring several times, with Shane Williams even dropping the ball as he tried to spin over the line, they could not quite breach the hosts' defence.
And the Royal XV made them pay when they mounted a rare attack and Roux's converted score gave them what looked like being a decisive 25-13 lead.
With time running out Byrne showed fine footballing skills to score a superb solo try and give the tourists some hope, and O'Gara's conversion and a subsequent penalty cut the gap to two points with seven minutes to play.
By now the momentum had swung firmly in favour of the Lions and first Wyn Jones and then O'Gara went over for converted tries to ensure the Lions got the tour under way with the result, if not the performance, they wanted.