Connacht blew a 12-point half-time lead as they lost to Ospreys at the Sportsground in the Guinness Pro14.
First-half tries from Alex Wootton and Paul Boyle put the hosts in a commanding position but a solitary penalty in the second half wasn't enough as three tries from the visitors earned a rare win in Ireland for the Welsh outfit.
The comeback was led by scrum-half Rhys Webb who responded to his omission from Wales' Six Nations squad with two tries.
Trailing 17-5 at half-time after converted tries, Ospreys bounced back from captain Justin Tipuric's sin-binning to claim their first victory in Ireland since September 2016.
Adding to George North's early try, Wales prospect Mat Protheroe and Webb both crossed in a profitable five-minute spell.
Webb then bagged the winning try from a 67th-minute maul.
The losing bonus point was enough to move Connacht into second place in Conference B where Munster remain the clear leaders.
A forward pass from Conor Fitzgerald prevented Connacht winger Wootton from touching down early on, and instead it was Ospreys who hit the front in the eighth minute.
Dan Lydiate's charge-down, coupled with a strong counter ruck, allowed them to build pressure, and some neat interplay between North, Tipuric and Dan Evans ended with the winger crossing for an unconverted try.
Toby Booth's side soon gobbled up ground through Sam Parry and Rhys Davies - only for John Porch and Wootton to rip the ball free.
As Connacht hunted down their elusive first try, Owen Watkin did well to deny Wootton in the left corner, but it was a case of third time lucky for the former Ireland Sevens international in the 29th minute.
A Kieran Marmion tackle dislodged the ball from Kieran Williams' grasp, allowing Fitzgerald to dart downfield unopposed and send the supporting Wootton over for a seven-pointer.
With Wales prop Rhodri Jones coughing up scrum penalties, Connacht went for the jugular approaching the interval.
Tipuric's maul offence earned him a yellow, and Boyle brilliantly barged over from Marmion's inside pass.
Fitzgerald's conversion extended the lead to 12 points, yet the 14-man Ospreys replied in terrific fashion.
Protheroe went over in the 47th minute for a timely seven-pointer, having sparked a fleet-footed move down the right involving North and Williams.
Stephen Myler also converted his half-back partner Webb's 51st-minute sidestepping score from a close-in maul, before Fitzgerald made it 20-19 by punishing a Lydiate offside.
Then it was Ospreys' turn again to force the issue, narrowly missing out on a maul try before a messy series of five-metre scrums, under referee Frank Murphy's watch, ate up the clock.
However, a well-supported Webb was unstoppable from a subsequent lineout drive in the left corner.
Myler converted for good measure, ensuring a fourth straight home defeat for Connacht in all competitions.
Connacht: John Porch; Peter Sullivan, Tom Daly, Peter Robb, Alex Wootton; Conor Fitzgerald, Kieran Marmion; Denis Buckley, Dave Heffernan, Finlay Bealham, Ultan Dillane, Gavin Thornbury, Jarrad Butler, Conor Oliver, Paul Boyle.
Replacements: Shane Delahunt, Matthew Burke, Conor Kenny, Niall Murray, Abraham Papali'i, Caolin Blade, Bundee Aki, Matt Healy.
Ospreys: Dan Evans; George North, Owen Watkin, Keiran Williams, Mat Protheroe; Stephen Myler, Rhys Webb; Rhodri Jones, Sam Parry, Ma'afu Fia, Adam Beard, Rhys Davies, Will Griffiths, Justin Tipuric, Dan Lydiate.
Replacements: Ifan Phillips, Gareth Thomas, Tom Botha, Lloyd Ashley, Morgan Morris, Reuben Morgan-Williams, Josh Thomas, Keelan Giles.