Toulouse guaranteed a home tie in the Heineken Cup quarter-finals with a bonus-point win at Stradey Park.
HEINEKEN CUP POOL SIX
Llanelli Scarlets: (23) 42
Tries: B Davies (2), Madden, King, Peel.
Cons: Hercus (4).
Pens: Hercus (3)
Toulouse: (29) 49
Tries: Clerc (4), Maka, Fritz.
Cons: Elissalde (5).
Pens: Elissalde (3).
Vincent Clerc grabbed four tries, with Isitolo Maka and Florian Fritz also crossing for the slick French side.
But the Scarlets were always within touching distance as Barry Davies (two), Martyn Madden, Regan King and Dwayne Peel scored well-worked tries.
Scarlets fly-half Mike Hercus kicked 17 points, with Jean-Baptise Elissalde adding 19 for the Pool Six winners.
Only 47 seconds were on the clock when Davies gave the Scarlets a dream start by collecting Dwayne Peel's long pass from a scrum and finding a huge gap to go over from five metres.
Hercus added the conversion with the aid of a deflection off the post.
Toulouse should have replied four minutes later, but Wales captain Gareth Thomas - his troublesome knee heavily bandaged - was guilty of a horrendous error when he failed to catch Yannick Jauzion's pass just short of the tryline.
Elissalde's penalty opened Toulouse's account, and then Hercus replied in kind for the home side.
Clerc's first try for the visitors soon followed as the winger shrugged off two weak tackles to score in the right corner. Elissalde landed the difficult conversion to level the scores inside at 10-10 inside the first 15 minutes.
Hercus' second penalty put the Scarlets ahead again, but their lead lasted only five minutes as Toulouse's huge number eight Maka was driven over for another converted try.
A similar scoring pattern soon followed as Clerc scored his second try - this time unconverted - after Hercus had landed his third penalty.
A hugely entertaining first half ended with a converted try apiece, with Toulouse getting that crucial fourth for a bonus point.
Scarlets scored first thanks to a superb break from centre King, who then found Hercus on his inside before prop Madden popped up perfectly to run in under the posts.
But the home side's defensive frailties were soon evident again as the imperious Jauzion powered through Hercus and fed centre partner Frisk for a clear run to the tryline.
The try-fest continued immediately after the break as Clerc grabbed his hat-trick after grounding Frederic Michalak's delightful chip-kick.
King then replied for the Scarlets when he sliced through the Toulouse defence after Peel had taken a series of quick tap penalties to make it 30-39.
A destructive Toulouse scrum gave Clerc the simple task of strolling over in the right corner for his fourth try, which Elissalde converted superbly from the touchline.
But the ding-dong battle continued as Peel scored under the posts after Matthew Rees' powerful drive from a tap penalty. Hercus converted to bring the Scarlets back to within 12 points with 10 minutes left.
Davies' second try - a superb counter attack with Mark Jones - set up a frantic finish.
But Toulouse held on in the remaining five minutes of injury time to march on to the next stage, while the Scarlets settle for third place in the group.
Scarlets director of rugby Gareth Jenkins:
"We took a positive attitude into the game, we wanted to make a statement in front of millions of television viewers that we are still an ambitious club.
"We wanted to win and be competitive against the best side in Europe, and we were competitive.
"We've made a statement today that we are a dangerous team and I think that will give us confidence for the rest of the season."
Toulouse full-back Gareth Thomas:
"It was a great game of rugby - great for the fans and a great advertisement for French and Welsh rugby.
"Both teams turned up wanting to play rugby.
"It was very important for us to come here, play our strongest team and get the bonus-point win - and that's what we did."
Scarlets: B. Davies; M. Jones, Watkins, King, James (capt); Hercus, Peel; Madden, Rees, J. Davies; Louw, A. Jones; D. Jones, Thomas, Popham.
Replacements: Afeaki for Louw (55), Quinnell for Thomas (76).
Not used: Williams, Hawkins, Stuart-Smith, Bowen, Evans.
Toulouse: Thomas; Clerc, Jauzion, Fritz, Garbajosa; Michalak, Elissalde; Poux, Bru, Hasan, Pelous, Millo-Chlusky, Bouilhou, Nyanga, I Maka.
Replacements: Mermoz for Fritz (64), Dubois for Michalak (42), Human for Hassanein (71), Lamboley for Millochlusky (60), Montauriol for Nyanga (65).
Not used: Lacombe, Brennan.
Referee: Dave Pearson (England)