Edinburgh claimed a morale-boosting 26-23 Pro12 victory over the Scarlets at Murrayfield on Friday.
The Scarlets' play-off hopes were dealt a real blow as Greig Laidlaw kicked a late penalty to snatch victory.
Wales' and Scotland's respective number tens, Rhys Priestland and Laidlaw, exchanged penalties in the early stages before the home side exploded into action.
Another Laidlaw penalty was followed by an excellent try from young Zimbabwe-born number eight David Denton, who carried a couple of opposition tacklers over the line with him after he raced onto an inside pass from Ross Rennie.
Priestland did add another three points for the visitors but they were severely hampered by two yellow cards given to front row forwards Deacon Manu and Matthew Rees within a few minutes of each other late in the first half.
Edinburgh exploited the two-man advantage and their dominance in the scrum with a penalty try right on half-time to make it 20-3.
Priestland again reduced the arrears with three points midway through the second half, once the Scarlets had been restored to their full complement, and moments later they pulled to within just four points of the hosts. Some good handling led to left winger Andy Fenby crossing and the conversion from the influential Priestland made it 20-16.
Laidlaw kicked a penalty on the hour mark to open up a lead of a converted try but the win was looking far from secure for the Scots.
And when Rennie was sent to the sin bin for a tip tackle just a minute later, the alarm bells really would have been ringing.
Indeed, it didn't take long for the Welshmen to take advantage of the extra man and after Stephen Jones had made a good initial break, he offloaded to Jonathan Davies to apply the finish.
Jones converted to level the scores at 23-23 and set up a tense last ten minutes.
But, after both sides had their chances to win it, Laidlaw stepped up to slot over the crucial penalty with just two minutes left and Edinburgh held on to record a well-deserved victory and severely dent the Scarlets' play-off hopes in the process.
Tries: Denton, Penalty try
Cons: Laidlaw 2
Pens: Laidlaw 4
Tries: Fenby, JJV Davies
Cons: Priestland, S. Jones
Pens: Priestland 3
Yellow cards: Manu (Scarlets - 37th min); Rees (Scarlets - 40th min)
Edinburgh: 15 Tom Brown, 14 Lee Jones, 13 Nick De Luca, 12 Matt Scott, 11 Tim Visser, 10 Greig Laidlaw (capt), 9 Mike Blair, 8 Stuart McInally, 7 Ross Rennie, 6 David Denton, 5 Sean Cox, 4 Grant Gilchrist, 3 Geoff Cross, 2 Ross Ford, 1 Allan Jacobsen.
Replacements: 16 Andrew Kelly, 17 Kyle Traynor, 18 Jack Gilding, 19 Esteban Lozada, 20 Roddy Grant, 21 Chris Leck, 22 Phil Godman, 23 Jim Thompson.
Scarlets: 15 Liam Williams, 14 George North, 13 Gareth Maule, 12 Jon Davies, 11 Andy Fenby, 10 Rhys Priestland, 9 Gareth Davies, 8 Kieran Murphy, 7 Johnathan Edwards, 6 Josh Turnbull, 5 Dominic Day, 4 Sione Timani, 3 Deacon Manu, 2 Matthew Rees (capt), 1 Rhodri Jones.
Replacements: 16 Ken Owens, 17 Phil John, 18 Peter Edwards, 19 Damian Welch, 20 Mat Gilbert, 21 Liam Davies, 22 Stephen Jones, 23 Sean Lamont.
Referee: Peter Fitzgibbon (Ireland)
Assistant referees: Peter Allan (Scotland), Graeme Marshall (Scotland)
Assessor: Fergus Neil (Scotland)