Connacht were made to fight tooth and nail for their first Magners League win since October as a late Matt Lacey try teed up their 20-17 success over the Borders at the Sportsground on Friday.
In the battle of the league's basement sides, it was Connacht who emerged victorious as a a late period of pressure paid off when flanker Lacey took a great line off a David Gannon pass to beat the cover and bag the match-winning score.
It was tough luck on the Borders who had twice gone in front - they were 10-6 to the good at half-time.
Winger Dougie Flockhart raced over in first-half injury time and captain for the night Gregor Townsend touched down with just 12 minutes remaining but, within sight of their first league win outside of Scotland since September 2005, Steve Bates' men faltered at the finish.
Connacht dominated the opening half territorially but could not make it pay on the scoreboard. Goal-kicking centre Mark McHugh capitalised on two early penalty opportunities, thumping his side into a 6-3 lead.
Garry Law replied for the visitors, whose defence was resolute during the first half-hour. Connacht's big pack began to find holes in it, but having kicked two penalties to touch, the hosts failed to grind down their opponents for a breakthrough try.
The Reivers' persistence paid off in injury-time, as after a lengthy injury stoppage for their prop Ed Kalman and a sin-binning for Connacht lock Gannon, Flockhart collected a fly-hack forward and raced over from the Connacht 10-metre line for the opening try.
Law converted for 10-6 but Connacht bit back on the hour mark when busy hooker Adrian Flavin was mauled over with McHugh converting.
Connacht's lead lasted all of nine minutes. Despite losing replacement prop Bruce McNeil to a yellow card, the Scots struck for their second try when Nick De Luca made all the running before popping off for Townsend to dot down.
Law's conversion handed the visitors a four-point buffer, yet a Connacht comeback always looked on the cards.
Gavin Williams was held up just short before another wave of attacks led to Lacey's clinching seven-pointer, which chalked up Connacht's seventh win in nine league meetings with the Borders.
Tries: Flavin, Lacey
Cons: McHugh, Warwick
Pens: McHugh 2
For Border Reivers:
Tries: Flockhart, Townsend
Cons: Law 2
Connacht: 15 David Slemen, 14 Darren Yapp, 13 John Hearty, 12 Mark McHugh (c), 11 Daniel Riordan, 10 Paul Warwick, 9 Conor O'Loughlin, 8 Colm Rigney, 7 Ray Ofisa, 6 John Muldoon, 5 Andrew Farley, 4 David Gannon, 3 Stephen Knoop, 2 Adrian Flavin, 1 Brett Wilkinson,
Replacements: 16 Conor Muldoon, 17 Ray Hogan, 18 Michael Swift, 19 Matt Lacey, 20 Chris Keane, 21 Peter Durcan, 22 Gavin Williams.
Border Reivers: 15 Stuart Moffat, 14 Dougie Flockhart, 13 Ben MacDougall, 12 Nick De Luca, 11 Garry Law, 10 Gregor Townsend, (c), 9 Rob Chrystie, 8 Scott Forrest, 7 Andy Miller, 6 Scott Newlands, 5 John Dalziel, 4 Opeta Palepoi, 3 Bruce Douglas, 2 Ross Ford, 1 Ed Kalman
Replacements: 16 Steve Scott, 17 Bruce McNeil, 18 Mark Lee, 19 Richie Vernon, 20 Calum Cusiter, 21 Steve Jones, 22 Bryan Rennie
Referee: Phil Fear (Wales)
Touch judges: Dermot Moloney (Ireland), Peter Roche (Ireland)
Assessor: Jim Irvine (Ireland)