Replacement scrum-half Jamie Nutbrown scored a late try as the Ospreys grabbed a 16-15 victory over Connacht.
Nutbrown took advantage of a defensive lapse to dart over from close range, and fellow replacement Matthew Jarvis converted from in front of the posts to deny victory to the hosts and end Ospeys' two-game losing streak in the Magners League.
Connacht had the chance to hit back with a last-gasp penalty for Miah Nikora, but he missed from a difficult position.
New Zealander Nikora scored all Connacht's points, kicking five penalties, while the Ospreys' teenage outside-half Matthew Morgan kicked two penalties and a drop-goal on his league debut.
Nikora landed two kicks in the opening seven minutes as Connacht took control early on.
Morgan slipped when trying to open the visitors' account from a penalty and the Welsh side should have scored a try only for Ashley Beck to knock on in sight of the try-line.
But Connacht had the better of the first quarter, aided by a powerful scrum which yielded a third successful penalty for Nikora.
Some energetic counter-rucking and an advancing maul preceded Morgan's first points, 21 minutes in.
Back came the hosts and good hands from Dermot Murphy and captain John Muldoon looked to have sent Fionn Carr over for the game's opening try, but referee Peter Allan ruled that he had been held up in the corner.
The Ospreys forwards won back some territory in the closing stages and Morgan converted the first of two penalty attempts to close the gap to 9-6 at half-time.
Connacht had to soak up pressure in the third quarter, full-back Gareth Owen missing a penalty from halfway for the Ospreys, and the hosts' Kiwi lock Bernie Upton was then sent to the sin-bin for throwing a punch.
A snap drop-goal from Morgan, on the hour mark, brought the Ospreys level, but it was Connacht who looked to be finishing the stronger.
Nikora coolly slotted two more penalties, after 71 and 73 minutes, to put them on course for a morale-boosting win over the champions.
But his fellow Kiwi Nutbrown had other ideas, spotting a gap in the defence and sniping through to set up the match-winning conversion.
For Ospreys:Try: Nutbrown
Pens: Morgan 2
Pens: Nikora 5
Connacht: 15 Gavin Duffy, 14 Troy Nathan, 13 Eoin Griffin, 12 Keith Matthews, 11 Fionn Carr, 10 Miah Nikora, 9 Frank Murphy, 8 John Muldoon, 7 Johnny O'Connor, 6 Michael McCarthy, 5 Bernie Upton, 4 Michael Swift, 3 Jamie Hagan, 2 Dermot Murphy, 1 Brett Wilkinson.
Replacements: 16 Ronan Loughney, 17 Barry Fa'amausili, 18 Dylan Rogers, 19 Andrew Browne, 20 Ezra Taylor, 21 Cillian Willis, 22 Ian Keatley, 23 Darragh Fanning.
Ospreys: 15 Gareth Owen, 14 Kristian Phillips, 13 Sonny Parker, 12 Ashley Beck, 11 Richard Fussell, 10 Matthew Morgan, 9 Rhys Webb, 8 Jerry Collins, 7 Marty Holah, 6 Justin Tipuric, 5 Ian Evans, 4 Conor McInerney, 3 Craig Mitchell, 2 Mefin Davies, 1 Duncan Jones.
Replacements: 16 Scott Baldwin, 17 Joe Rees, 18 Cai Griffiths, 19 James Goode, 20 James King, 21 Jamie Nutbrown, 22 Matthew Jarvis, 23 Barry Davies.
Referee: Peter Allan (Scotland)