Edinburgh snatched Celtic League derby revenge to book their place in next season's Heineken Cup.
Edinburgh (14) 31
Tries: Callam 2, Pringle.
Cons: Laney 2
Pens: Laney 4
Borders (10) 18
Tries: McGee, Weston
Pens: Ford 2
But their victory, making amends for a New Year defeat at Netherdale, wrecked the Borders' hopes of playing in the premier European event.
Ironically, the Gunners' three tries at Murrayfield were shared by former Borders-based stars, David Callam and Fergus Pringle of Hawick.
And Japan-bound Brendan Laney fired over a string of pin-point kicks.
Borders made a positive start and edged in front after just 60 seconds.
The home side wandered offside, leaving Charlie Hore to confidently land the penalty from 25m.
Edinburgh seized the initiative in the 12th minute with a try by breakaway forward Callam in the wake of a reversed decision by Welsh referee Neil Ballard.
He initially awarded a pressure-relieving penalty to Borders, then switched the kick to the Gunners for backchat.
They set up a line-out close to the line and Callam was driven over.
Edinburgh kept up the momentum and although they struggled to find gaps, they did force Borders to give away a string of penalties which left them a mountain to climb to wrestle their way back into the contest.
Laney struck first in the 17th minute from close range when the scrum was deliberately collapsed.
And he followed up with trickier kicks for offside and ball-killing respectively as Borders struggled to cope with the mounting pressure.
But they hit back on the stroke of the interval to gain fresh hope.
It was almost a carbon-copy of Edinburgh's touchdown as prop Tom McGee was powered over following a penalty line-out, with Hore slotting the conversion.
The score added a spring to their step and Hore clipped over another penalty to reduce the gap to a single point 14 minutes after the restart.
Laney gave Edinburgh some breathing space when he took his tally to four as the visitors proved too slow to roll clear of the ruck.
In a hectic finale Pringle and Callam ploughed over in quick succession, Laney's two conversions taking the Gunners out of reach.
Borders refused to buckle completely and Jonny Weston crossed for a try after a quickly-taken tap-penalty.
Edinburgh: B Laney, M Pyke, M Di Rollo, R Dewey, S Webster, P Godman, R Lawson, A Jacobsen, A Kelly, C Smith, F Pringle, A Kellock, T Blackadder, S Cross, D Callam.
Replacements: Dickinson for Jacobsen (70), Hall for Kelly (70).
Not Used: Duncan, Harrison, Cusiter, Boston, Joiner.
The Borders: S Moffat, S Danielli, C Hore, J Pattison, N Walker, A Warnock, J Weston, P Thomson, S Scott, T McGee, M Blair, C Stewart, R Ford, A Miller, J Dalziel.
Replacements: Morton for Pattison (70), Goodfellow for Weston (75), Cross for McGee (72), Newlands for Blair (79), Parr for Ford (59).
Not Used: Kay.