Hawick Youth Under-15s were hit by a late goal from Selkirk which ended their cup hopes at the semi-final stage.
The young Teries took the lead through striker Sam Finn, but the Souters drew level with a counter from a corner-kick.
Teri midfielder Daniel Nixon restored his side’s lead with a composed finish. Selkirk kept on battling, though, and were rewarded with a penalty which sent the keeper the wrong way.
This ding-dong clash continued apace and Hawick edged back in front through a Ryan Spratt strike from inside the box.
The visitors were not to be outdone, though, and notched another equaliser with a volley from outside the 18-yard area, before taking the lead for the first time in the closing stages with a goal at the back post following a free-kick.