A brace of second half tries from Fionn Carr helped Connacht turn things around against Cardiff and score their first win of the new Magners League season.
This meeting of the league's bottom two sides seemed to be within the Blues' grasp as full-back Ben Blair put them 10-0 up early on at the Sportsground.
But Connacht rose to the challenge in the second half and the efforts of John Muldoon and his pack laid the platform for a superb comeback.
Winger Carr showed his finishing skills to their fullest and an Ian Keatley penalty pushed the home side into an eight-point lead.
Stunned back into life, Cardiff recovered from the sin-binning of Ma'ama Molitika and dominated territory for the closing stages.
Two more Blair penalties set up a grandstand finish but Cardiff's only scorer on the night missed a last-minute penalty chance to win the game and Dai Young's men had to settle for a losing bonus point.
Young made five changes to the side he fielded against Munster last weekend, with Lions centre Jamie Roberts the most notable introduction.
Roberts and Gareth Thomas provided plenty of grunt in the Blues midfield and an early incision caught Connacht out, allowing the visitors to spread the ball wide for the supporting Blair to touch down.
The Kiwi ace added the conversion and Connacht's new out-half Miah Nikora, a former New Zealand Under-21 international, missed two straightforward opportunities to reply.
Nikora's full debut lasted just 27 minutes, as Michael Bradley brought in Keatley - who had been hit and miss in last weekend's heavy defeat to Edinburgh.
Nikora's failure to convert from in front of the Cardiff posts was punished by Blair at the other end, with the penalty coming after good work from captain Paul Tito and Richie Rees.
However, the Blues backs were failing to click in attack and Keatley clawed Connacht back into contention, landing the second of two penalty attempts before the break.
The Blues' 10-3 interval lead was whittled away by a big surge from Connacht. Keatley got them on the front foot and Carr did brilliantly to collect a dinked kick across to the wing from Gavin Duffy and hack on before touching down.
Cardiff were stuttering and after a hands in the ruck decision saw Molitika binned, Carr slipped through for his third try in two games.
The score was built on sustained pressure from the Connacht forwards and after Troy Nathan was stopped just short of the line, the space opened up on the short side for Carr to strike.
Keatley's subsequent conversion and penalty gave Connacht some breathing space as they looked to seal their first win in seven league games.
Cardiff, bringing another Lion in Andy Powell into the fray, fought back and forced two penalties that Blair was able to convert - but a third from further out was off target and Connacht deservedly held on.