Aled Thomas penalty wins it for Scarlets
Scarlets were grateful to a late penalty from replacement fly-half Aled Thomas as they snatched a 22-21 victory in a gripping Guinness Pro12 tussle at Parc y Scarlets.
The West Walians had looked in control, 19-6 ahead midway through the second half, but Edinburgh battled back strongly in the final quarter and tries from number eight Cornell du Preez and replacement Alex Toolis had looked like claiming the spoils.
However, Edinburgh conceded a contentious offside penalty in front of their own posts with three minutes remaining and Thomas kept his nerve to clinch a crucial win for the Scarlets' play-off challenge.
The win keeps the Scarlets in the top four, while fifth-placed Edinburgh lost valuable ground on the leading quartet.
The Scarlets, who handed a debut to South African second row David Bulbring, almost made a blistering start when Canadian wing DTH van der Merwe flew out of the blocks to snaffle the kick-off only for Edinburgh full-back Greig Tonks to pull off a try-saving tackle on the World Cup star.
The opening try was not long in coming, however, with number eight Morgan Allen brushing aside some weak defence before galloping over in the sixth minute. Fly-half Steve Shingler added the extras.
A Shingler penalty extended the home lead, before scrum-half Nathan Fowles put the Scots on the scoreboard following a strong scrum.
Replacement Thomas, who had come on for the injured Shingler, responded with three points with his first touch to restore the Scarlets' 10-point cushion.
It needed some last-ditch Scarlets defence to deny Edinburgh at the end of the half with Fowles also hitting the upright with a penalty.
The scrum-half made no mistake two minutes after the restart, but Thomas added two more penalties to push the Scarlets into apparent control at 19-6.
Then came the Edinburgh comeback. D u Preez stretched over as Edinburgh made their pressure pay and with the home scrum penalised in the shadow of their own posts, Tonks kicked his side to within five points.
With Edinburgh continuing to pile on the pressure, replacement Toolis dived over wide out and Tonks converted brilliantly from the touchline to give his side the lead for the first time with only five minutes left on the clock.
But an offside call handed Thomas his chance and he made no mistake with the match-winning kick.