Leigh Halfpenny kicked the Cardiff Blues to a morale-boosting win in the Scottish capital as they got the better of Edinburgh in a closely-fought encounter.
A late fightback from Edinburgh proved valiant enough to secure a losing bonus point for them, but Tim Visser's last-gasp try and two David Blair penalties were unable to halt their losing streak.
The first quarter was dominated by Cardiff, with Xavier Rush and captain Paul Tito making notable contributions in the early stages, their frequent strong carries keeping the Edinburgh defence on their toes.
The first chance fell to the visitors, centre Dafydd Hewitt and flanker Martyn Williams combining to carve open the home defence. The ball was recycled and moved left, only for winger Leigh Halfpenny to knock on with the try-line at his mercy.
It looked as though the deadlock would be broken moments later, but resolute defence from the hosts culminated with Simon Webster bundling his opposite number Richard Mustoe into touch.
Edinburgh were handed a chance to steal an undeserved lead just after the 20-minute mark, when Cardiff were penalised for not releasing at the breakdown, but Blair was off the mark with his penalty attempt.
The hosts were made to pay minutes later, Halfpenny slotting a penalty from 40 metres out to hand his side the initiative.
Registering on the scoreboard appeared to relax the Cardiff backs, Hewitt and Casey Laulala stamping their authority on the midfield.
Inevitably, the pink-shirted Blues furthered their advantage before the break. Full-back Chris Czekaj crossed for the game's first try after being played in by a fantastic offload from key man Rush. Halfpenny converted to send Cardiff in at half-time with a 10-0 lead.
The second period had a similar rhythm to the first, Edinburgh conceding possession far too frequently to build up any pressure.
Despite that, it was the hosts who were first to register on the scoreboard, Blair making amends for his earlier miss by slotting a straightforward penalty.
Halfpenny restored his side's 10-point margin with a second successful penalty, before adding a further three points after Visser was penalised for a push on Cardiff's Tom Slater.
The introduction of Scotland lock Scott MacLeod, on the hour mark, seemed to have an immediate impact. His presence helped the home forwards to move up a gear and exert greater pressure.
Visser almost atoned for his misdemeanour, thundering towards the corner after Greig Laidlaw's tap penalty had opened up the defence.
Although the flying Dutchman was bundled into touch. Blair was handed a penalty opportunity following a disrupted Cardiff line, and he duly split the posts.
Blair and Halfpenny both missed further penalty opportunities as the hosts began to turn the screw, yet the Cardiff defence managed to combat any advances, with Rush particularly impressive.
Then, with the final possession of the game, Visser snaffled his side a losing bonus point, evading Halfpenny's desperate tackle to slide over in the corner for his 11th try of the current league campaign – one better than last season.
Speaking afterwards, Edinburgh's interim head coach Nick Scrivener said: "I was pleased with the way we dug in, but frustrated that we put ourselves in a position where we had to, and disappointed that we've come away with another loss.
"A number of players showed up well, with Lewis Niven in particular carrying the ball and giving us more stability in the scrum.
"But we're still being too imprecise at key moments and that's going to keep costing us until we sort it out.
"Nobody is going to feel sorry for us, and we can't feel sorry for ourselves. We've got to dig deep, show our mettle and finish the season strongly."