The Scarlets made hard work of it on a sunny Saturday afternoon but deep into injury-time, they managed to turn what looked like a second successive defeat into a bonus point victory courtesy of a Sean Lamont try.
The move came at the end of a exhaustive period of home pressure and would have been heartbreaking for Connacht who had come from 20-13 behind at half-time to lead 33-30 in injury-time.
A memorable hat-trick of tries from winger Fionn Carr had put them in position for a rare away win, their first in Wales since April 2008.
In the end, the Scarlets had the answers and a game littered with handling errors but augmented by a some truly superb rugby ended in joyous scenes for the 6,433 home crowd.
Connacht burst out of the blocks and led 6-0 after 20 minutes thanks to a brace of penalties from out-half Ian Keatley. The confidence gained from last weekend's bonus point home win over Dragons was clearly telling.
However, once the Scarlets found their feet they started to make an impact on the contest. The returning Stephen Jones opened his side's account with a 22nd minute penalty and within 90 seconds they had the game's first try from inspirational young centre Jon Davies.
That score was followed up on 26 minutes with a well-taken long range penalty from Jones and the home supporters were sensing a return to form for their side with the score now 13-6.
The revival was put on hold from the restart as the Scarlets targeted full-back Gavin Duffy who delivered, rising high to win the ball and setting a storming attack in motion. Prop Jamie Hagan burst clear and, on the recycle, Keatley's footwork made the space for Carr to eventually score Connacht's first try.
The Scarlets restored their advantage in first half injury-time with Regan King's try after a well-weighted kick through from Jones and a brilliant take and pass from Jon Davies.
The score came seconds after an avoidable sin-bin for Connacht's stand-in skipper Frank Murphy, who high-tackled Scarlets full-back Andy Fenby. That left it 20-13 for the break.
Connacht scored first on the resumption with a breakaway try from Carr, converted brilliantly by Keatley, before they took the lead through their out-half. Jones levelled but the visitors were in no mood to let that knock them off their stride.
Carr's third try was made by a lovely inside pass from replacement scrum half Cillian Willis to winger Troy Nathan and finished with conviction, but the Scarlets, who lost their opener in Treviso, did not panic this time – even with a seven-point deficit at 30-23.
After Connacht lost replacement prop Ronan Loughney to the sin-bin, Davies notched his second try which allowed Jones to level matters within four minutes.
The loss of Loughney for Connacht's second sin-binning was a crucial blow, yet Keatley put Eric Elwood's men back in front, with a penalty from the restart.
With the score at 33-30 and Connacht down to 14 men, the Scarlets spent the closing seven minutes on the attack and Connacht held on gamely right up until Lamont scored.
The Scottish winger's match winner came after a series of phases on the visitors' line and a quick release to the backs saw the hosts take advantage of a gaping overlap.