Scarlets survived a spirited showing from Edinburgh as they overcame the Scottish side 14-13 in their RaboDirect PRO12 meeting in Llanelli on Friday.
With their top-four ambitions at stake, the Welsh region took an early 8-0 lead through Andy Fenby's try and an Aled Thomas penalty.
But the visitors responded through a touchdown from Dougie Fife and five points via the boot of Harry Leonard.
Leonard and Thomas traded three-pointers after the break before Owen Williams' kick gained a vital victory to extend Edinburgh's losing streak to eleven.
The Scottish outfit have endured a dreadful run of form and the hosts took advantage of that lack of confidence and immediately went ahead when a period of pressure ended in Thomas kicking a penalty.
They stretched that advantage when slack defending saw Fenby scythe through the heart of the visitors' rearguard and touch down.
However, to their credit, Edinburgh hit back. Leonard initially reduced the deficit with a three-pointer before his excellent pass sent Fife over unopposed, the stand-off converting.
Although there was no further score until half-time, the away side were impressive in their endeavour and held out the Scarlets' attacks with relative ease.
And they were rewarded four minutes into the second period when their fly-half kicked his second penalty from the tee.
Thomas then moved the hosts to within two points and Fife was sin-binned for a number of team infringements, but substitute Williams initially missed the opportunity to regain the advantage.
The replacement pivot made no mistake thirteen minutes from time and it proved to be the decisive score as the Scarlets held on.
Pen: Thomas 2, O Williams
Pen: Leonard 2
Scarlets: 15 Liam Williams, 14 Nic Reynolds, 13 Gareth Maule, 12 Adam Warren, 11 Andy Fenby, 10 Aled Thomas, 9 Aled Davies, 8 Rob McCusker (c), 7 Jonathan Edwards, 6 Aaron Shingler, 5 Johan Snyman, 4 Jake Ball, 3 Samson Lee, 2 Emyr Phillips, 1 Phil John.
Replacements: 16 Matthew Rees, 17 Rhodri Jones, 18 Deacon Manu, 19 Sione Timani, 20 Kieran Murphy, 21 Gareth Davies, 22 Owen Williams, 23 Kristian Phillips.
Edinburgh: 15 Greig Tonks, 14 Dougie Fife, 13 Ben Cairns, 12 Ben Atiga, 11 Lee Jones, 10 Harry Leonard, 9 Richie Rees, 8 David Denton, 7 Hamish Watson, 6 Stuart McInally, 5 Sean Cox (c), 4 Perry Parker, 3 Willem Nel, 2 Steven Lawrie, 1 Allan Jacobsen.
Replacements: 16 Andy Titterrell, 17 John Yapp, 18 Alex Allan, 19 Robert McAlpine, 20 Netani Talei, 21 Chris Leck, 22 Piers Francis, 23 Tom Brown.
Referee: tba (Italy)
Assistant referees: Tim Hayes (Wales), Greg Morgan (Wales)
Television match official: Paul Adams (Wales)