Melrose arrived as unbeaten league leaders, but departed in second place after surrendering that record to a committed and ambitious Edinburgh side, who consolidated third spot and closed on the top two after 80 entertaining minutes illuminated by their back three - full-back Nyle Godsmark, who scored a glorious bonus-point fourth try, and wingers Sam Pecqueur and Jamie Farndale.
"I thought our back three were outstanding," said Edinburgh coach Jonny Else. "But we had more than that. Skipper Gregg Campbell, as always, gave a great lead. Alex Blair's game management was superb. But, from one to 20, every member of our squad contributed. We made good decisions. Our discipline, particularly in defence, was first class. Now I want us to develop from this excellent win over a good Melrose side."
Opposite number John Dalziel was, naturally, less upbeat as he analysed his side's first defeat. "We didn't expect an easy ride here, but contributed to our downfall with too many errors, we gifted two tries from interceptions, then squandered a possible other two ourselves. We departed from our game plan, then, when we got in front in the second half, didn't manage the game well.
"Naturally, I'm disappointed with the outcome, but well done Accies. We will bounce back."
Both sides ran everything to the delight of the 1000 spectators. Melrose's South African full-back Austin Lockington matched the Edinburgh back three in terms of entertainment value, and scored a memorable long-range try, while Alex Blair's running ability - capped by his interception try on the stroke of half-time, plus that aforementioned game management - demonstrated why he has won a recall to Edinburgh's ranks. His watching older brother Mike, the former Scotland captain, appeared to be impressed.
However, the day's highlight was probably replacement lock Tom Stuart pulling Lockington's attempted chip out of the air and scampering 20 metres for the 71st-minute try which put Edinburgh ahead .
The Borderers had taken the lead through Joe Helps' penalty goal, before Gregg Campbell's try, converted by Ruaridh Bonner, turned things in the capital side's favour. Back came Helps with a second penalty but, right on the break, Blair's try and Bonner's conversion made it 14-6 to Edinburgh at half-time. Hooker Alun Walker's try for Melrose cut the gap to three points, then Bonner and Helps exchanged penalties before Lockington's try, and Helps' conversion, put the visitors 21-17 ahead.
Under some pressure Edinburgh then turned defence into attack. Stuart's solo try, converted by Bonner, restored their lead and, with time running out, Farndale's break-out and some superb backing-up, with No.8 Andrew Findlater at its head, set Godsmark galloping home to seal victory for the home side.