It was a dramatic finale to a match in which two well-drilled sides playing with plenty of pace and skill served up a tremendous advert for the club game.
The visitors drew first blood when Thomas Gordon finished off a searing break by Joe Reynolds in eight minutes and Gregor Hunter converted. Heriot’s struck back almost immediately with a Ross Jones penalty and he added a second in 23 minutes.
The hosts capped a spell of pressure when Jack McClean dived over. Jones converted for a six point lead that was cut to three when Hunter landed a penalty with the final action of the half.
Jones restored the gap with a penalty before the visitors regained the initiative through a try from Robbie Nelson, converted by Hunter, who then added a penalty.
It took Heriot’s 20 minutes to hit back and when they did it came courtesy of an Andrew Simmers try, converted by Jones.
But the visitors raised their game once more and Nelson powered over for a second time then Hunter converted to clinch the win.