Borders shrugged off their injury worries as they came from behind to break their Celtic League duck and defeat The Blues at Netherdale.
Borders (10) 35
Tries: Weston, MacRae, Warnock, Brown
Cons: Warnock 3
Pens: Warnock 2, Hore
Blues (17) 25
Tries: Sowden-Taylor, Powell, Morgan
Cons: L Thomas 2
Pen: L Thomas 2
Tries by Robin Sowden-Taylor and Ryan Powell had put the visitors in charge before Jonny Weston replied.
Craig Morgan went over for the Blues, but Calum MacRae and Ally Warnock hit back again for the home side.
Kelly Brown forced his way across for the clincher - and Warnock made sure of victory with a last-gasp penalty.
Cardiff had looked on course to avenge last season's defeat on the same turf until three tries in six minutes earned the Borders a precious bonus point.
Lee Thomas' early penalty for the Blues was cancelled out by a similar strike at the other end by Warnock.
Cardiff seized the initiative with two well-worked tries in quick succession.
Flanker Sowden-Taylor surged over to give Thomas a simple conversion.
And, four minutes later, scrum-half Powell darted through a narrow gap to reach the line, with Thomas again on target.
Borders rallied late in the first half, with number eight Brown's expert pick-up from the scrum base paving the way for Weston to burrow over - Warnock adding the extras.
There was drama after the restart as Warnock was yellow-carded for a deliberate knock-on - allowing Thomas to bag another penalty.
But Charlie Hore replied for the Borders almost immediately.
The action moved up a gear when Morgan went over for the third Blues touchdown - only for Borders to carve out two of their own in quickfire order through MacRae and Warnock, who slotted both conversions.
The thrilling revival continued as Brown grabbed a late try and Warnock settled the issue with a penalty.
Borders: G Morton, S Moffat, C MacRae, C Hore, S Danielli, A Warnock, J Weston, T McGee, R Ford, G Cross, M Blair, C Stewart, S Gray (capt), W McEntee, K Brown.
Replacements: W Kay, G Anderson, J Dalziel, A Miller, D Moore, J Steel, J Pattison.
Blues: M Nuthall; F Tuilagi, S James, T Davies, C Morgan (capt); L Thomas, R Powell; A Lewis, R Thomas, M Jones, D Jones, N Budgett, N Thomas, R Sowden-Taylor, J Malpas.
Replacements: J Yapp, B Evans, R Sidoli, M Lewis, R Smith, D Dewdney, N Macleod.
Referee: Marshall Kilgore (Ireland)