The Scarlets ended their season on a high note, but saw their Pro12 play-off hopes disappear as Glasgow secured the fourth spot with a comfortable win over Connacht.
Scrum-half Gareth Davies touched down twice for the hosts, Liam Willams also going over and the hosts also earned a penalty try from a scrum.
Andries Pretorius, Alex Cuthbert and Harry Robinson scored Blues' tries.
But the hosts proved too strong in the dying stages.
The fifth-placed Scarlets' first target was to score four tries and win but their cause was not helped by the fact they they could only draw with Munster in their previous game.
That left their play-off hopes hanging by the narrowest of threads.
Nigel Davies' side did their bit to keep the dream alive by enticing the Blues into a loose encounter.
The fact that the Blues were willing participants was no surprise with neither pressure or expectation on their shoulders.
Both teams were also bidding farewell to a number of players, erstwhile Wales colleagues Stephen Jones and Gethin Jenkins among them.
But the opening period was notable for the efforts of largely younger and aspiring players.
Andries Pretorius put the Blues ahead as he burst clear in the second minute, Sweeney converting.
Priestland kicked a penalty in response and the Blues were denied a breakaway try in memorable circumstances.
Teenage wing Harry Robinson ripped the ball off Liam Williams near half-way and appeared to have a clear run to the line.
But Bath-bound lock Dominic Day ran Robinson down and stifled his progress before Sean Lamont put a leg under the ball to dislodge it as the Blues wing stretched for the line.
The hosts went ahead when Lamont helped put scrum-half Davies clear, the latter rounding Sweeney for his first try, converted by Priestland for them to lead 10-7 at the break.
Having suffered at the Scarlets hands in the season's previous encounter, Cuthbert was clearly delighted after some classy work from Davies, Casey Laulala and Williams set him free.
Davies struck back with his second touchdown with flanker Kieran Murphy, Williams and Davies doing the admirable approach work.
The visitors responded in kind, Pretorius and Lloyd Williams among the providers for Robinson to go over and level.
Parks failed with the conversion, but put the Blues back ahead with a penalty.
Wales and Scarlets veteran Jones departed to a rousing reception from the stands in the 67th minute.
Highlights - Scarlets 29-20 Blues
Soon after his centre replacement Adam Warren flicked a pass out of a tackle to send full-back Williams in.
After Toulon-bound Wales prop Jenkins' departure and return as replacement John Yapp was injured, the hosts forced a penalty try to put the outcome beyond doubt, Priestland converting.
Liam Williams, Sean Lamont, Nick Reynolds, Stephen Jones, Andy Fenby, Rhys Priestland, Gareth Davies; Rhodri Jones, Ken Owens, Deacon Manu, Aaron Shingler, Dominic Day, Kieran Murphy, Josh Turnbull (capt), Ben Morgan.
Darren Warren for S Jones (78), Viliami Iongi for Fenby (16), Tavis Knoyle for G Davies (60), Phil John for R Jones (60), Emyr Phillips for Owens (60), Simon Gardner for Manu (75), Damien Welch for Day (75), Johnathan Edwards for Morgan (78).
Chris Czekaj; Alex Cuthbert, Casey Laulala, Dafydd Hewitt, Harry Robinson; Ceri Sweeney, Lloyd Williams; Gethin Jenkins, Marc Breeze, Scott Andrews, Bradley Davies, James Down, Maama Molitika, Andries Pretorius, Josh Navidi.
Gavin Evans for Robinson (69), Dan Parks for Sweeney (41), Richie Rees for L Williams (58), John Yapp for G Jenkins (74), Luke Hamilton for Navidi (74), Kristian Dacey for Breeze (70).
Not Used: Ryan Harford, Macauley Cook.
Nigel Owens (WRU)
Tim Hayes, Ian Davies (both WRU)
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.