A last gasp maul saw Angus Fraser push through the bodies and go over to steal a dramatic win for the hosts, with Grant Hughes adding the conversion for a 27-23 scoreline.
It was a dagger through the heat of Bears who had recovered from 20-10 behind to lead the match going into the closing stages.
The hosts struck first blood in the 10th minute with a line-out inside the Bears 22 resulting in Reyner Kennedy pushing through for the opening try which went unconverted.
Boroughmuir hit back with Jordan Edmunds catching a crossfield kick from Tom Pittman to touch down for his side's opening try, which Pittman convered for a 7-5 lead.
A Craig Robertson penalty in the 22nd minute restored County's lead only for Pittman to slot a penalty of his own to put Bears back in front at 10-8.
Stirling broke through the Bears defensive line on the half hour mark with Tom Roche touching down under the posts and Robertson converting for a 15-10 half-time advantage.
That lead was extended after the break when Stevie Hamilton broke down the wing for County's third try, which went unconverted.
Pittman put over a penalty to close the gap to 20-13 then a yellow card to Lewis Skinner put the hosts down to 14 men.
Bears took advantage when Edmunds went through to score his second try of the game, converted by Pittman to level the scores.
The boot of Pittman then put the visitors ahead before Stirling stole the win at the death.