Edinburgh halted a dismal run of form in the RaboDirect PRO12 when they saw off the current champions to record their first win in six matches.
- Related Content
The visitors, who had eight players absent on international duty, could have few complaints after coming second best to opponents with seven men away representing their country in all facets of the game and with a breakdown in discipline that saw two players yellow carded.
Willem Nel touched down for the home side and stand off Gregor Hunter booted the remaining points with six penalties, while Matthew Morgan contributed all of the Ospreys points with a self-converted try and two penalties.
Neither side threatened the opposition line in an error strewn opening 14 minutes, and a break from Morgan was the precursor to the night's opening score, with the visitors eventually breaking the deadlock when home scrum-half Richie Rees prevented a quick throw and was penalised. That presented Morgan with a penalty which he steered between the sticks.
Edinburgh responded with their first attack of note and when the ball popped out on the Ospreys side it was deemed to have been won illegally. Hunter stroked over the penalty to restore parity.
Morgan thumped over a long-range score to nudge the Welshmen in front once more, before the hosts brought the Murrayfield crowd to its feet with a flowing move that featured Dougie Fife, Hunter and Rees, who released South African prop Nel to power over for a try.
However, the visitors struck back four minutes later, and again it was Morgan who did the damage when he was on hand to dart though some lacklustre defending to touch down after Ospreys had stretched the home defence with some slick handling.
And the same player was on target with the conversion to send the visitors in at the break with a 13-8 advantage.
An offence at the first scrum of the second half saw debutant prop Owen Williams despatched to the sin bin for 10 minutes. Hunter was off the mark with the kick but atoned a minute later when another scrum offence presented him with a scoring opportunity.
Edinburgh kept the visitors hemmed into their own half and the pressure yielded two further penalties which Hunter clipped over to build a four-point advantage entering the final quarter.
Ospreys rang the changes and Morgan came inches short of adding to his personal tally.
But the defending league champions were unable to add to their points total and their hopes of repeating their win in the corresponding fixture last season suffered another blow when Sam Lewis was shown yellow after a blatant offside at a ruck was exacerbated by an off the ball incident with home skipper Sean Cox.
With 75 minutes on the clock, Hunter recorded his first miss of the second half, ensuring that there could be no easing off by Edinburgh.
And, having seen their side suffer several late collapses so far this season, there were a few anxious moments among the home support before Hunter sealed the win with the final kick of the game - a strike that left the visitors empty-handed.