Springbok Ruan Pienaar scored all of Ulster's points at Parc y Scarlets
Ruan Pienaar's stunning 50-yard last-gasp penalty secured Ulster a crucial comeback victory at the Scarlets.
The South African's superb kicking display kept Ulster in the game and his added-time strike keeps the Irish team in the Magners League play-off hunt.
The Scarlets were set to move to second when their pack was penalised for a binding slip and Pienaar punished them with a kick from the half-way line.
A penalty try and 11 Rhys Priestland points had given the hosts a 16-9 lead.
Pienaar had kicked the Irish side into a 6-0 lead, as they did at the Ospreys last week, with two penalty goals inside eight minute sand the Springbok scrum-half also created his side's best chance of a try with a 30-metre dash from a line-out.
But fly-half Priestland, buoyed after his first Wales cap in their Six Nations victory against Scotland last weekend, kicked the hosts level with two strikes of his own.
Late penalty kick pleases Ulster scrum-half Ruan Pienaar
The Scarlets then took the lead in the 22nd-minute after a penalty try - and held it until the dying seconds.
The hosts took the game to Ulster and wing Gareth Maule taking full-back Adam D'Arcy over his own line before three five-metre scrums earned the home side a penalty try.
Though the Scarlets had the upper hand in the scrum, their line-out failed to function which kept Ulster in the hunt - and the visitors scored a third penalty for Pienaar.
But two minutes from half-time the Scarlets restored their seven-point lead with a sweetly-struck drop-goal from in-form Priestland just before the break - which turned out to be the hosts' final score of the night.
The second-half was a war of attrition played in poor conditions but Ulster got to within a point of the Scarlets with Pienaar penalties on 48 and 60 minutes.
Scottish international Sean Lamont concedes Scarlets are 'gutted' after defeat
The Scarlets must have thought they had done enough to seal the points until number eight Ben Morgan slipped his binding illegally at a scrum to allow Pienaar to win it with the last kick of the match.
His strike just crept over the bar to secure Ulster their first win on Scarlets soil and complete an impeccable six-penalty kicking display and an 18-point haul for the 47-times capped South African star.
The shell-shocked Scarlets, who rarely looked like conceding a try, were left to rue their indiscipline and had to settle for a losing bonus point which took them up to third in the Magners League table.
Scarlets: D Evans; G Maule; R King, S Williams; S Lamont; R Priestland, M Roberts; I Thomas (c), E Phillips, R Thomas, V Cooper, L Reed, R McCusker, J Turnbull, B Morgan. Replacements: R Lawrence on for E Phillips (46), J Fa'amatuainu on for V Cooper (46), T Knoyle on for M Roberts (46), J Edwards (on for Fa'amatuainu (63), S Gardiner on for R Thomas (65) Not Used: R Jones, D Newton, J Ajuwa.
Ulster: A D'Arcy; A Trimble, N Spence, P Wallace, C Gilroy; P Jackson, R Pienaar; Tom Court, A Kyriacou, D Fitzpatrick, J Muller, T Barker, TJ Anderson, C Henry, P Wannenburg. Replacements: R Diack on for TJ Andreson (50), S Danielli on for A D'Arcy (50), P Marshall on for P Jackson (50), N Brady on for A Kyriacou (56), J Cronin on for D Fitzpatrick (65), R Caldwell on for T Barker (65) Not Used: B Young, L Marshall.
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.