The home side had taken an early lead when skipper Stuart Moffat had raced away to touchdown in the corner, and with Charlie Hore adding the conversion the Borders seemed to be taking control.
However the loss of Paul Thomson to the sin bin gave Glasgow Rugby the advantage with Jon Petrie picking from the base of the scrum and feeding Sam Pinder who darted over for the try, which test fly half Dan Parks converted. Parks then increased the visitors lead with a penalty five minutes before the break.
Glasgow Rugby who were without the injured Gordon Bulloch in the second period continued to press but the Borders, having soaked up the pressure, were able to break free with Moffat coming close to a second try.
The game remained poised on a knife edge, with Glasgow Rugby thinking they had sealed it when Scott Barrow dived in for a second try only for referee Hugh Watkins to bring play back for a knock on. The Borders then came close to a share of the spoils when Hore pulled an injury time penalty chance wide.