Had the Borderers picked up another victory they would have gone back down the A7 with a massive lead at the top of the table. As it is, their advantage was cut to just two points by a lively and determined Heriot's side who added a bonus point to their haul as they ran in five tries.
The Edinburgh outfit had wobbled badly last weekend when they lost at home to Hawick, but it was clear that they had no intention of suffering another embarrassment at the hands of friends from the south. There was a meatiness and muscularity about their forward play, with Scotland sevens player Michael Maltman adding real thrust to their efforts.
Heriot's also benefited from a wonderful performance by Keith Buchan in the centre, the former Boroughmuir player capping a busy and effective display with two strong tries. More than anything, though, it was the spirit of the side that shone through, and their enthusiasm and energy reached levels that even seemed to be picked up by their notoriously dozy crowd.
It was a measure of Heriot's quality that their victory was in no way a reflection of any Melrose weaknesses. The visitors made a couple of silly errors along the way, but they played with gusto and spent lengthy periods hammering away at the Heriot's line. They helped themselves to a couple of tries during those spells, but a lesser side than Heriot's would have coughed up many more. The Edinburgh side's defensive will was astonishing.
Mostly, though, it was through the crisp efficiency of their work on the ball that they built their victory. Territorially, they probably came off second-best - though not by a huge distance -but they were wonderfully sharp in the Melrose 22.
Where Melrose laboured hard to make advances, gnawing off inches with pick-and-drive tactics, Heriot's simply sliced through, taking their scores almost gleefully.
It was all the more uplifting at a time when the general standard of Premiership level rugby has been called into question by a series of heavy defeats for the Scottish sides in the British and Irish Cup. Perversely, it may actually have helped Heriot's, and Melrose for that matter, that they are not part of that competition this season, for they looked fresh and eager from the start.
Heriot's had a try on the board inside five minutes, one that they finished off cleverly. After a series of forward dunts through the middle, they shipped the ball left, centre Cameron Ferguson looped lock Murray Dougas, and a smart overhead pass put winger Max Learmonth over in the left corner.By half time, they had added a penalty through Duncan Wilson - who was to convert only one of their five tries - but Melrose had helped themselves to their first try as well, prop Nick Beavon thundering over from close range in the 20th minute.
Melrose had gone on to dominate the second quarter, and the expectation at the interval was that they would soon start to cash in on their earlier work. Yet Heriot's ripped up the script just four minutes after the re-start. Their second try sprang from a horrible error by Melrose fly-half Richard Mill, who fluffed his attempt to gather a straightforward kick near the left touchline then watched in horror as Buchan gathered and sent hooker George Turner through.
Buchan stretched the lead soon afterwards, touching down after Maltman had powered into the Melrose 22 to set up the platform. Melrose did manage to strike back a little later when another extended period of pressure ended with Damien Hoyland darting over for a try, but any hopes raised as they closed the gap to three points, at 20-17, were quickly dashed.
First, Buchan twisted the knife with his second score before Learmonth completed his own double to extinguish Melrose's last hopes.
Heriot's: C Goudie; M Learmonth, K Buchan, C Ferguson, M Nimmo; R Carmichael, G Wilson; C Owenson, G Turner, N Borel, R Nimmo, M Douglas, M Maltman, A Henderson, J Turley. Replacements: K Bryce, S Mustard, J Hill, S Kennedy, H Boisseau.
Melrose: F Thomson (captain); D Hoyland, A Skeen, J Helps, ALockington; R Mill, B Colvine; N Little, T Pearce, N Beavon, G Dodds, S Johnston, P Eccles, G Runciman, A Nagle. Replacements: R Ferguson, G Holborn, R Miller, T Wilson, M Robertson.
Referee: D Changleng (Peebles)