Mark Jones' late breakaway try denied Border Reivers a famous win at Stradey Park as Llanelli Scarlets held out.
Scarlets: (15) 30:
Tries: King 2, Dunlea, M Jones.
Cons: Hercus 2.
Pens: Hercus 2.
Borders: (9) 26:
Tries: Brown, Sititi, Hore.
Pens: MacRae 3.
A shock looked on when Charlie Hore crashed over seven minutes from time and Calum MacRae's conversion gave Borders a slim one-point lead.
But with the Scarlets pinned in their own 22, Mike Hercus intercepted a loose pass and sent wing Jones racing away.
The Scots at least earned a bonus point in defeat in their Heineken Cup quest, as did the Scarlets for four tries.
MacRae gave Borders an early lead with the first of his three penalties.
But Scarlets hit back through Regan King as the Kiwi centre struck twice in six minutes, breaking down the left wing each time for tries.
Hercus converted the second of those tries, with an earlier penalty giving the Scarlets a handy 15-3 lead with just a quarter-hour gone.
But Borders dug in, smothering any more Welsh threats and earning two penalty chances that MacRae gleefully converted.
The Welsh pulled away again after the break when prop Craig Dunlea crashed over from a maul, Hercus converting.
Back came Borders again as the visitors' back-row came to the fore.
First number eight Kelly Brown crashed over, after being set free by Stuart Moffat's fine break, then replacement flanker Semo Sititi grabbed a second try.
Unfortunately MacRae was unable to convert either effort, and when Hercus kicked another penalty the Scarlets led 25-19 going into the last 10 minutes.
Then came the grandstand finish, first Hore scorching through for a seven-pointer that put Borders into a one-point lead.
But as Borders pushed for the score that would finish Scarlets off, Hercus intercepted.
Despite pulling his hamstring in the process, the fly-half was able to send Wales wing Jones racing upfield to rescue the victory.
Scarlets: L Byrne; M Jones, D James (capt), R King, T Selley; M Hercus, D Peel; P John, M Rees, C Dunlea, V Cooper, H Louw, I Afeaki, D Jones, J Mills.
Replacements: G. Evans for D. James (79), Bowen for Hercus (77). Not Used: J. Davies, Edwards, A. Jones, Owen, Stuart-Smith.
Border Reivers: S Moffat; S Danielli, B MacDougall, C MacRae, N Walker; G Townsend, B McKerchar; T McGee, S Scott, B Douglas, S MacLeod, O Palepoi, J Dalziel, A Miller, K Brown.
Replacements: Replacements: Hore for Townsend (61), Weston for McKearchar (69), Parr for McGee (64), Kay for Scott (69), Stewart for Palepoi (44), Sititi for Dalziel (44). Not Used: Law.
Referee: Peter Fitzgibbon (IRFU)