Aberdeen Grammar came within two minutes of a Border double at Selkirk, only to have the game cruelly snatched away from them.
Home flanker Sean Nixon crashed over the Rubislaw outfit’s line to tie up the scores at 26 points apiece.
Worse was to come for the visitors when winger Frazer Anderson slotted the touchline conversion, making it a perfect day for the player who kicked all of his four attempts at goal in the last-gasp 28-26 win.
Grammar head coach Ali O’Connor was understandably gutted at the conclusion of a game his side had controlled for most of the 80 minutes.
They went into the last quarter leading 26-7 on the back of four tries, scored by stand-off Sam Knudson, flanker Alex Dravitski, scrum-half Cairan Wood and winger Nat Coe.
O’Connor said: “It was hard to take, particularly as we had the lion’s share of the game, and dominated up front.
“Normally I would be happy to have taken seven points of a possible 10 against two Border sides, including Kelso last week.
“But we must learn to close out games, and not be too flamboyant going into the closing stages of a game we have seemingly won.
“There were, however, some outstanding performances, including first-rate showings from Ewan Stewart, Chris Jollands and captain Sam Knudson.”
Playing into a stiff first-half breeze, Grammar did not make the best of the conditions, only taking a 12-7 lead into the break.
But early in the second half two well-taken tries, both converted by Knudson, saw them apparently on their way.
But the Borderers had other ideas, battling back with touchdowns of their own to snatch an unlikely victory.
In Glasgow, Gordonians kept up their unbeaten run, easing past Hillhead Jordanhill 25-17 to the satisfaction of head coach Ryan Morrice.
He said: “This is the kind of game we would have lost last season, but we have learned how to keep our composure and stick to the game plan.
“The win has set us up nicely for a tilt at leaders Newton Stewart at Countesswells. The try bonus point was very welcome. We are in a good place.”
The Gordonians tries were scored by Matt Hillier, Danny Usugo, David Ilyine and Chris Simpson. Full-back Graeme Crawford kicked a conversion and a penalty.
At the Meadows, newly-promoted Ellon ran out convincing 36-16 winners against derby rivals Aberdeen Wanderers, earning them bragging rights in the Caley Division 1 clash.
Head coach Craig Parslow said: “We have a great team ethic, everyone is playing for each other.”