A moment of magic from Hanno Dirksen was enough to earn Ospreys a win over wasteful Edinburgh at Murrayfield.
The winger brushed off two opponents then ran on to collect his own kick and blaze away from more despairing dives to touch down in the second half.
Early in the game, Dougie Fife finished off a scrappy move to land his first Edinburgh try.
Ospreys, who sit second in the Pro12 table, replied with hooker Richard Hibbard finishing off a driving maul.
Edinburgh stand-off Phil Godman knocked over three penalties but was guilty of a terrible miss right in front of the posts after Dirksen's score.
The home side also elected to take a penalty scrum five metres from the line in the closing stages, only to be penalised for going too early.
This was Ospreys' first win on the road since their 17-6 victory in Connacht on 26 November, while Edinburgh have lost all four of their league clashes against Welsh opposition this term.
The visitors almost made an early breakthrough when James King charged down an attempted clearance from Chris Leck but Chris Paterson was on hand to mop up the danger.
Godman was wide of the mark with a penalty but the number 10 quickly atoned when he banged over a more difficult effort after Ian Gough offended at the breakdown.
And the Scots extended their lead after 18 minutes when the weaving Paterson was halted just short of the line but offloaded to Alun Walker who flipped the ball to Godman and, despite a wobbly pass, debutant centre Fife gathered to crash over.
Godman failed with a none-too-taxing conversion.
Dan Biggar clawed back three points with a neatly executed drop goal and that sparked a period of Ospreys pressure which saw them draw level.
Biggar dispatched a penalty into touch 10 metres from the Edinburgh line and, from the ensuing lineout, a powerful drive pushed Edinburgh back over their line, with Hibbard applying the final touch.
Edinburgh ended the first period in the ascendancy and Godman nudged the hosts into a three-point lead at the break when he landed a second penalty after Kahn Fotuali'i had transgressed.
Both sides freshened up their teams with Ospreys introducing fit-again Alun Wyn Jones for the final half hour and the Scots bringing their new signing Ulises Gamboa into the fray.
And it was the hosts who were next to boost their tally when Godman landed another penalty.
With defences on top, it was something of a shock to see Dirksen suddenly motoring away to score a wonderful try.
The South African gathered in his own half, beat off two men in black, chipped over the advancing Godman then eluded Tim Visser for a showboat dive under the sticks, leaving Biggar with a simple conversion.
Godman had an instant opportunity to reclaim the lead but missed from close range before Biggar was also off the mark with a long-range effort at the other end.
Edinburgh mustered a late spell of sustained pressure but they were unable to breach a resolute Ospreys defence.
Edinburgh: Paterson, T. Brown, Fife, Houston, T. Visser, Godman, Leck, Traynor, Walker, Gilding, Gilchrist, Cox, McInally, Grant, Talei. Replacements: Hislop for Traynor (77), Kelly for Walker (63), Gamboa for Gilding (50), Lozada for Gilchrist (60). Not Used: MacDonald, Black, Hunter, S. Visser.
Ospreys: Fussell, Dirksen, Isaacs, Bishop, E. Walker, Biggar, Fotuali'i, D. Jones, Hibbard, Rees, Gough, King, Smith, Lewis, J. Thomas. Replacements: Webb for Fotuali'i (54), Bevington for D. Jones (49), A. Jones for Gough (49), Bearman for King (64). Not Used: Baldwin, Taylor, M. Morgan, Parker.
Ref: Leo Colgan (IRFU).