The Blues secured their first away win of the season by seeing off Connacht at Dubarry Park on Saturday night.
Connacht (3) 18
Tries: McCarthey, Clarke
Pens: Elwood 2
Blues (13) 21
Tries: N Robinson 2
Con: N Robinson
Pens: N Robinson 3
The result takes them up to seventh in the league table and they leapfrog the Ospreys in the race for Wales' last spot in next season's Heineken Cup.
Fly-half Nick Robinson scored all the Blues' points, including two tries, and they led 18-6 on the hour mark.
But late tries from Connacht's Adrian Clarke and Mike McCarthy almost saw the Irish side come from behind.
Former Wales Under-21 Robinson set the Blues on their way with a second-minute penalty.
The fly-half then intercepted on 16 minutes to sprint over from 30 metres out.
Connacht answered with an Eric Elwood penalty in front of the uprights five minutes later, cancelling out Robinson's second penalty.
The Irish province were unlucky not to end the opening half with a try, as South African hooker Marnus Uijs and
back-row Matt Lacey were both mauled over the Cardiff line late on, but Scottish referee Mike Hall ruled both drives out.
Matters worsened for the home side as a wonderfully timed dash by scrum-half Ryan Powell four minutes after the restart saw outside-half Robinson collect the offload and touch down for an 18-3 lead.
Elwood thumped over his second penalty but crucially failed to add the extras to Clarke's try, hitting the post.
McHugh also hit an upright with a penalty effort, four minutes after Robinson had stretched Cardiff's lead to 21-11 on 72 minutes.
McCarthy lunged over late on to claim a bonus point for losing by less than seven points, with Elwood converting, but Cardiff held out.
Connacht: McHugh, Mostyn, Yapp, T. Allnut, Robinson, Elwood, O'Loughlin, McFarland, Uijs, Bracken, Browne, Farley, Swift, Lacey, Carroll.
Replacements: Clarke, Jackman, McCarthy, Neville, Keane, Moore, Munn.
Cardiff Blues: Van Vuuren, Walne, J. Robinson, Allen, Morgan, N. Robinson, Powell, Fourie, R. Thomas, Evans, Senekal, A. Moore, Cockbain, N. Thomas, Sowden-Taylor.
Replacements: Crompton, Lewis, Quinnell, Brownrigg, Appleyard, Muller, A. Moore.