Ulster got back to winning ways by holding off a late Connacht comeback to win 22-20 in Friday's United Rugby Championship match at the Sportsground.
Ulster led 19-3 but Connacht fought back to within two, Jack Carty's missed conversion attempt denying them a draw.
The northern province had lost three in a row in all competitions but two Tom Stewart tries and one from Rob Lyttle helped them edge the win in Galway.
Caolin Blade, Jarrad Butler and Adam Byrne crossed for the hosts.
Ireland fly-half Carty pulled his last-gasp kick wide in a dramatic finish as the home side's late surge fell just short.
The victors move into third in the URC table with their seventh win in nine URC outings this campaign while their opponents occupy 11th in the standings after Friday's games, their points tally boosted slightly by a losing bonus point.
Connacht came into the encounter on the back of six wins from their last eight games in all competitions after starting their URC campaign with three consecutive losses, including away to Ulster on the opening weekend.
Only Leinster had come away from Galway with a win in the the past 11 months but it was Ulster, who had suffered consecutive defeats by Leinster, Sale and La Rochelle, who made the better start.
Ulster on top early on
Dan McFarland's men bossed territory and possession for much of the first half and put together some nice passages of play but it was the 29th minute before they registered a score.
Stewart offloaded to Ethan McIlroy and he passed to Luke Marshall, whose attempt to find Lyttle was knocked backward by Tiernan O'Halloran.
The Ulster wing showed some nifty footwork to kick the ball over the line and then dived on it for a deserved opening try. Cooney was off-target with the conversion.
Carty reduced his side's deficit soon after with a penalty after Stewart was deemed to be offside by referee Frank Murphy.
The visitors retained the upper hand after the break and were rewarded when Stewart rumbled over on 45 minutes.
Ulster secured possession from a lineout and advanced to their opponents' line courtesy of a rolling maul, with the Ulster hooker marking a player-of-the-match performance by stretching to score.
This time Cooney kicked the ball between the posts for the additional two points.
Ulster continued to control proceedings, putting together multi-phase play, keeping the ball in hand and Nathan Doak impressing on his first start at fly-half.
Nine minutes after their last score the same strategy produced try number three for the northern province - kick into the corner, Henderson wins the lineout, rolling maul towards the line and Stewart this time pirouetted off the back before barging over for his seventh try of the season.
Cooney's conversion from a tight angle extended his side's lead to 16 points as an increasingly beleaguered home side struggled to get any foothold in the game.
Connacht battle back
The westerners brought their arrears to 11 points on the hour mark however as scrum-half Blade gained possession from a lineout and dinked his way unchallenged over the line. Carty missed with his relatively straightforward-looking conversion attempt.
Stewart was then denied a hat-trick of tries from close range by some good last-minute defensive work by Andy Friend's side.
Connacht finished strongly, using their man-advantage to good effect after Greg Jones was sin-binned and almost salvaging an unlikely draw.
Cian Prendergast saw his score disallowed for accidental offside after peeling off the back of the ruck and diving over.
Butler then dotted down and Carty converted to set up a frantic finish, with fellow replacement Byrne going over five minutes into added time after his side went through the phases.
Mack Hansen did well in the build-up, Carty broke through Ulster's scrambling defence and Byrne shrugged off Lyttle to dive over in the corner.
Carty's conversion kick went just wide of the posts much to the disappointment of the home fans and the delight of the visiting supporters whose side had battled to a hard-earned success.
Connacht: O'Halloran; Porch, Farrell, Aki, Hansen; Carty (capt), Blade; Buckley, Delahunt, Bealham; Murphy, N Murray; O Dowling, Oliver, Prendergast.
Replacements: Heffernan, Dooley, Robertson-McCoy, Hurley-Langton, Butler, Marmion, Hawkshaw, Byrne.
Ulster: Lowry; McIlroy, Marshall, McCloskey, Lyttle; Doak, Cooney; Sutherland, Stewart, Moore; O'Connor, Henderson (capt); McCann, Marcus Rea, Timoney.
Replacements: Andrew, O'Sullivan, Milasinovich, Carter, G Jones, D Shanahan, J Flannery, S Moore