The Borders leapfrogged Glasgow into fifth place in the Celtic League with a hard-fought victory at Netherdale.
Borders: (8) 24
Tries: Danielli, Scott
Pens: Hore 4
Glasgow: (6) 13
Pens: Parks 2
An early try from Simon Danielli and the first of four penalties by Charlie Hore put the hosts 8-6 up at half-time.
Scotland captain Jon Petrie made his return after four months out but could not inspire the visitors to victory.
Rory Lamont's try gave them hope but
a try from veteran hooker Stevie Scott two minutes from time sealed an important victory for the Borders.
Victory boosted their hopes of claiming Scotland's second Heineken Cup spot for next season ahead of Glasgow, with Celtic League title-chasers Edinburgh in pole position.
Scotland scrum-half Chris Cusiter's quick tapped penalty and slick handling from the returning Gregor Townsend and Ben MacDougall put Danielli over in the corner in the fifth minute.
A Hore penalty put Borders 8-0 up before two Dan Parks penalties cut Glasgow's deficit.
Borders had Scotland prop Bruce Douglas sent to the sin-bin for a
professional foul after 25 minutes, but the visitors could not turn possession and territory into points in his absence.
Poor discipline cost the Warriors dear on the resumption as three quick-fire Hore penalties took Borders 17-6 clear.
Lamont snatched an opportunist try, converted by Parks, to set up a tense finale.
But their hopes of completing a dramatic fightback were dashed when replacement forward Gregor Hayter was sin-binned for killing the ball.
Good work by Nikki Walker and Semo Sititi sent Scott over to seal victory, Hore slotting the extras.
Reivers head coach Steve Bates:
"This result is the perfect festive gift and we can use it as a springboard for the next few months.
"It wasn't our prettiest ever performance, but, in tense local derbies like
this, it is the result that matters most.
"We have a very tough programme ahead, both in the league and in Europe, so the win will allow the guys to celebrate the New Year with optimism."
Glasgow head coach Hugh Campbell:
"We got what we deserved because we didn't get the basics right at
crucial moments and gave away far too many needless penalties.
"We need to shake off this defeat quickly, take the positives and eradicate
"We have a superb bunch of players at the club and I back them to recover and put in a strong end to the season."
Borders: C McRae, S Danielli, B MacDougall, C Hore, N Walker, G Townsend, C Cusiter, P Thomson (capt), R Ford, B Douglas, S MacLeod, O Palepoi, K Brown, A Miller, S Sititi.
Replacements: S Scott, T McGee, C Stewart, J Dalziel, B McKerchar, G Law, S Moffat.
Glasgow: G Staniforth, H O'Hare, G Morrison, A Henderson, R Lamont, D Parks, S Pinder; K Tkachuk, S Lawson, E Murray, T Barker, D Turner, J Beattie, J Barclay, J Petrie (capt). Replacements: F Thomson, L Harrison, G Hayter, S Swindall, G Beveridge, C Gregor, A Craig
Referee: Peter Allan (SRFU)