Scarlets kept their European Cup qualification on track with a thrilling Pro12 bonus-point win over Connacht.
Jonathan Davies' try saw the Welsh side lead 13-6 at half-time and the game seemed over after Gareth Davies and Josh Turnbull both crossed.
But Connacht, hard on Scarlets' heels in the table, narrowed the gap as Fionn Carr and Robbie Henshaw scored.
In a frantic finale Gareth Maule went over for Scarlets' fourth try, but Eoin McKeon gave Connacht the last word.
The number eight's try under the posts, which was converted by replacement fly-half Miah Nikora, ensured two losing bonus points for the Irish side and means they are seven points behind Scarlets, who are in sixth place.
Scarlets welcomed back fly-half Rhys Priestland for the first time since the Six Nations and also included their other Wales stars Jonathan Davies, Liam Williams, Ken Owens, Rhodri Jones and Jake Ball.
The home side cruised into a 7-0 lead inside two minutes when a quick tapped penalty in his own half by Priestland sent wing Jordan Williams on a 40-metre run before his inside pass put centre Davies over.
Connacht replied with two Dan Parks penalties but Priestland struck a 40-metre penalty of his own, although his next attempt struck the post to leave Scarlets with a 13-6 lead at the break.
Priestland again hit the woodwork with his first kick of the second half and soon after lock Richard Kelly, who had replaced Ball at half-time, was held up over the line.
But when Jonathan Davies crashed down the middle to set up a close-range ruck, scrum-half Gareth Davies picked up to snipe under the posts for his ninth try of the campaign.
Scarlets followed that with an incredible try started by Liam Williams in his own 22, jinking before linking with Priestland, who spread the ball to Kristian Phillips.
The wing showed pace and strength to continue the counter-attack and back-row Turnbull was in support to finish off the move.
At 25-6 the game seemed sealed at that point but Connacht staged a remarkable comeback, started as scrum-half Marmion grabbed a try from a quick tapped penalty.
Two more Irish tries followed in the space of three as Carr latched on to a chip from Nikora, before full-back Henshaw squeezed over in the right corner - although Nikora could not convert to draw the scores level.
In a dramatic finish Maule stretched over under the posts for Scarlets' fourth try, but Henshaw's break sent number eight McKeon away to claim what could yet prove to be two crucial bonus points in defeat - one for a fourth try and one for losing by seven points or less.
Scarlets: Liam Williams; Kristian Phillips, Jonathan Davies (capt), Olly Barkley, Jordan Williams; Rhys Priestland, Gareth Davies; Phil John, Ken Owens, Rhodri Jones, Jake Ball, Johan Snyman, Josh Turnbull, John Barclay, Sione Timani.
Replacements: Emyr Phillips for Owens (57), Rob Evans for John (57), Horatiu Pungea for R. Jones (74), Richard Kelly for Ball (41), Lewis Rawlins for Barclay (78), Rhodri Williams for G. Davies (57), Aled Thomas, Gareth Maule for Barkley (68).
Connacht: R Henshaw; T O'Halloran, E Griffin, D McSharry, F Carr; D Parks, K Marmion; D Buckley, J Harris-Wright, R Ah You; A Muldowney, M Kearney; J Muldoon (capt), E Masterson, E McKeon.
Replacements: D Heffernan for Harris-Wright (54), R Loughney for Browne (63), N White for Ah You (47), M Swift for Kearney (51), A Browne for Masteron (54), F Murphy, M Nikora for Parks (66), D Leader for O'Halloran (69).
Referee: Neil Paterson (SRU)
Assistant referees: Wayne Davies, Martyn Lewis (WRU)
Citing commissioner: Russell Howell (WRU)
TMO: Tim Hayes (WRU)