Connacht overcame a studdorn Cardiff side 29-22 to qualify for the Guinness PRO14 quarter-finals as well as securing Champions Cup rugby for next season.
A blustery Sportsground played host to a match with huge ramifications for both sides in Conference A.
Scrum half Caolin Blade opened the scoring for the home side after a clever break near a ruck from Paul Boyle to dive under the posts. Owen Lane dotted down for the visitors to level up the scores before second row Gavin Thornbury gave the home side a 14-7 lead at the break after scoring from a driving maul.
An inspired Jack Carty stretched Connacht's lead out to 17-7 shortly after the break which made him the Championship's highest scorer this season on 142 points.
Carty then scored and converted a try of his own as Andy Friend's side appeared set to canter into the play-offs. However, Cardiff were never likely to lay down that easily. Gareth Anscombe replied with a penalty to bring scores back to 24-10 before Josh Turnbull powered over from close range to make it 24-17 after Anscombe converted.
Connacht's nerves were short lived as they replied straight from the kick-off with Matt Healy pouncing on the visitor's sloppiness at the restart. Carty missed the touchline conversion but the hosts led 29-17 only for Anscombe to slip Harries in in the corner with less than a minute left on the clock. The Welsh out-half missed the conversion to leave it 29-22 with only seconds remaining.
The home side held on for arguably their most valuable win in Andy Friend's tenure which sees them qualify for the PRO14 play-offs but also assures them of a seat at European rugby's top table next season.
Cardiff move on to a huge all-Welsh clash with Ospreys next week.
Everyone’s in the Team Of Us.
Vodafone. The Official Sponsor of the Irish Rugby Team.