Neil Jenkins scored 23 points as Pontypridd ground out another win to stay on course for a place in the Celtic League quarter-finals.
The Borders outscored their hosts by three tries to one and proved they are getting better with every game, despite the fact they remain winnless in the Celtic League.
"It was a hard earned victory and we didn't really perform. It was disappointing, but at least it was a win," said acting skipper Jon Bryant.
The robust Borders pack drove New Zealand flanker Campbell Feather over the home line for the game's first try in the opening half. That broke the deadlock after Kevin Utterson and Jenkins had swapped early kicks.
In the second half, Scotland and Lions outside half Gregor Townsend ghosted over for a try at the posts, but the ever reliable boot of Jenkins kept his side in contention.
Then some quick thinking from Wales back row man Michael Owen from a five metre penalty earned Ponty a try.Owen caught the Borders defenders napping as he ignored a penalty opportunity for Jenkins and drove over the line.
Jenkins added the wide angled conversion to leave the Scots chasing two scores to win.
In the end, they managed to send international wing Craig Moir racing 30 metres fro a try which Utterson converted with the last kick of the game to ensure a bonus point for the visitors.
Pontypridd lost their international flanker Richard Parks with a facial injury in the second half when he got a finger in his eye.
Scorers: Pontypridd: Try: M Owen; Con: N Jenkins: Pens: N Jenkins 6; DG: N Jenkins. Scottish Borders: Tries: C Feather, G Townsend, C Moir; Cons: K Utterson 3; Pens: K Utterson 2.
Meet the members of the WRU's inaugural Youth Board - after an online selection process which saw a host of high calibre candidates submit video applications the WRU has made its first 15 appointments.The board is made up of individuals aged between 16 and 21, and will meet for the first time at Principality Stadium on Monday 15th February.
The Wales Women's team headed to Dare Valley Country Park on a team bonding exercise as the entire squad got together for the very first time in preparation for this season's Six Nations championship which kicks off on Saturday with a clash against defending champions Ireland, in Donnybrook.
Wales Head Coach Warren Gatland discusses his team selection for the opening round of the RBS 6 Nations where he leads his side against Ireland, on Sunday. As WRU TV's Luke Brodley discovers, Gatland is fully aware of the challenges the defending champions pose
WRUTV caught up with Wales Women captain Rachel Taylor at the RBS 6 Nations launch and how a good crowd really helps boost the girls performance. Tickets for all three Women's home games at The Gnoll, Neath are available from www.wru.wales/tickets