Damien Hoyland scored two tries as Scotland left it late to edge out Ireland 21-20 at Netherdale in the Six Nations Under-20 championship.
The Boroughmuir winger plunged over for his second score eight minutes from time, with Tommy Allan converting.
Full-back Ruaridh Young opened the scoring for the hosts, while Ryan Murphy and David Panter replied following Hoyland's second touchdown.
The Irish won a penalty try after the interval but could not hold on.
Stand-off Allan converted all three of Scotland's scores, while visiting centre Tom Daly missed two penalties and two conversion attempts.
"What a performance," enthused Scotland coach Sean Lineen.
Talking to the Scottish Rugby website, he added: "This team has character and belief and they realised that you don't sit back when things aren't going your way; you step up and turn the screw.
"The lesson we must take away from tonight is that you don't let teams come back into the match.
"There is no reason now why we can't keep the momentum going and and beat Wales and France and go on to win the Under-20 6 Nations for the first time."
Ten minutes had passed when a grubber from Robbie Fergusson sat up perfectly for Young to score.
Daly knocked over a penalty but it was his stray pass that Hoyland snaffled up to race through and touch down.
However, just one point separated the teams at the interval as Murphy and Panter found gaps in the home defence.
With the visitors enjoying a good spell of pressure, Scotland flanker Will Bordill was sin-binned for slowing the ball down.
Soon after, Ireland were awarded a penalty try as the outnumbered home defence buckled at a scrum.
However, Hoyland scored again when the ball was worked to him from a line-out and Allan curled over a difficult kick to build on the previous 30-17 victory over Italy.
Scotland: Ruaridh Young; Damien Hoyland, Chris Auld, Robbie Fergusson, Rory Hughes; Tommy Allan, Sam Hidalgo-Clyne; Jamie Bhatti, Callum Black, Phil Cringle, Adam Sinclair, Jonny Gray (captain), Alex Henderson, Will Bordill, Adam Ashe.
Replacements: Reyner Kennedy (for Black, 67mins), Shawn Muir (for Bhatti, 55mins), D'arcy Rae (for Cringle, 55mins), Ruaridh Leishman (for Sinclair, 72mins), Tommy Spinks (for Henderson, 63mins), Ali Price (for Hidalgo-Clyne, 22mins), Alex Hagart and Keith Buchan (for Young, 64mins).
Ireland: Darragh Leader; David Panter, Tom Daly, Rory Scannell, Rory Scholes; Steve Crosbie, Luke McGrath; Peter Dooley, George McGuigan, Chris Taylor, Gavin Thornbury, John Donan, Peadar Timmins, Josh Van Der Flier, Ryan Murphy.
Replacements: John Andrew (for McGuigan, 68mins), Ryan Furness, Adam Boland, Jerry Sexton, Eoghan Masterson, John Creighton, Mark Roche (for Scannell, 65mins) and Darren Sweetnam (for Crosbie, 70mins).
Referee: Ian Davies (WRU)