Kiwi Miah Nikora kicked a late penalty as the Magners League's bottom side Connacht edged out high-flying Edinburgh 22-21 on Friday.
Despite missing of number of first-choice players through injury, including team captain John Muldoon and powerful centre Niva Ta'auso, Connacht rose to the occasion and extended their unbeaten home run to seven matches.
In an end-to-end game laced with twists and turns, an early try from winger Brian Tuohy helped Connacht into an 11-0 lead before play-off hopefuls Edinburgh hit back.
Wingers Tim Visser and Mark Robertson both touched down as the Scottish side took a 14-11 half-time lead,
Connacht fly-half Ian Keatley, who finished with 14 points, and Edinburgh flanker Roddy Grant exchanged tries in the second half, but Keatley's replacement Nikora grabbed the glory by nailing the match-winning kick four minutes from time.
The victory should provide Michael Bradley's charges with a huge lift ahead of next weekend's Amlin Challenge Cup quarter-final against French side Bourgoin.
Connacht really should have been ahead at half-time, having opened well and showed some of the form which almost shocked Leinster into submission last time out.
Keatley got them off the mark with a penalty in the third minute and he made a superb break to set up Tuohy for an unconverted eighth-minute try.
Keatley was linking well with the in-form Frank Murphy, behind a cohesive home pack, and he landed a lovely drop goal from distance while Connacht had a penalty advantage.
But try-scoring chances for the hosts were missed when the fleet-footed Fionn Carr decided to kick rather than back his own pace, and Mike McComish and Michael Swift were held up close to the line on separate occasions.
Edinburgh, who had lacked their usual panache, sprung into life in the closing 10 minutes of the opening half.
Phil Godman twice kicked penalties to the corner and the pressure told when Dutchman Visser broke through for his eighth try of the league campaign.
Godman added the extras and after a Troy Nathan-led attack came to nothing, Edinburgh clinically countered for their second try, swinging play left and right before Robertson finished well.
Three points ahead at the break, Rob Moffat's men tore into Connacht at the start of the second half and with Jim Hamilton and Alan MacDonald carrying well, they looked poised to score.
Ben Cairns went close to registering a try but Keatley left the Scots reeling, five minutes in, when he intercepted a pass on the 10-metre line and darted over for an encouraging score which he failed to convert.
Edinburgh's all-international pack began to force the issue, particularly at scrum time, and a typically pacy attack from the visitors saw Grant cross for a try which Godman converted.
At 21-19 up with 20 minutes remaining, Edinburgh were all set to finish the job but Connacht dug their heels in and produced a typically dogged final quarter, as the rain began to teem down.
Chasing their first away win since December, Edinburgh were met with stubborn resistance and as Connacht countered and their forwards built through the phases, they eked out that crucial penalty which Nikora coolly converted.
Tries: Tuohy, Keatley
Pens: Keatley 2, Nikora
Drop goal: Keatley
Tries: Visser, Robertson, Grant
Cons: Godman 3
Connacht: 15 Gavin Duffy (capt), 14 Brian Tuohy, 13 Troy Nathan, 12 Aidan Wynne, 11 Fionn Carr, 10 Ian Keatley, 9 Frank Murphy, 8 Mike McComish, 7 Johnny O'Connor, 6 Mike McCarthy, 5 Bernie Upton, 4 Michael Swift, 3 Jamie Hagan, 2 Sean Cronin, 1 Brett Wilkinson.
Replacements: 16 Adrian Flavin, 17 Ronan Loughney, 18 Dave Nolan, 19 Andrew Browne, 20 Conor O'Loughlin, 21 Miah Nikora, 22 Eoin Griffin.
Edinburgh: 15 Jim Thompson, 14 Mark Robertson, 13 Nick De Luca, 12 Ben Cairns, 11 Tim Visser, 10 Phil Godman, 9 Mike Blair (capt), 8 Roddy Grant, 7 Ross Rennie, 6 Alan MacDonald, 5 Jim Hamilton, 4 Scott MacLeod, 3 Geoff Cross, 2 Andrew Kelly, 1 Allan Jacobsen.
Replacements: 16 Ross Ford, 17 Kyle Traynor, 18 Steve Turnbull, 19 Scott Newlands, 20 Greig Laidlaw, 21 David Blair, 22 John Houston.
Referee: Leighton Hodges