Everton striker Fraser Hornby scored a hat-trick as Scotland Under-21s beat Andorra in their European Championship qualifier at Tynecastle.
It keeps alive the Scots' hopes of a place in next year's finals in San Marino with three games left to play.
Scot Gemmill's side move into third place in Group 4, one point behind Netherlands, who drew 0-0 away to leaders England.
England remain six points ahead of the Scots.
Gemmill's side, who need to finish among the four best runners-up to secure a play-off place, next travel to face the Dutch and Ukraine before hosting England.
After a sustained spell of pressure on the Andorra goal, the breakthrough came just before half-time.
Hibernian defender Ryan Porteous was hauled to the ground by Alex Martinez as they challenged for Billy Gilmour's cross from a corner.
Macedonian referee Dejan Jakimovski gave a penalty and Hornby sent goalkeeper Iker Alvarez de Eulate the wrong way.
Scotland sealed the victory with a lovely flowing move that was started and finished by Hornby.
The 18-year old-collected the ball in midfield before sweeping it out towards Gilmour, who had space on the right flank.
The Chelsea midfielder in turn sent a wonderful curling ball into the box, where Hornby glanced the ball beyond Iker.
With seven minutes left, Hornby sealed his hat-trick when he slid in to connect with a Chris Cadden's low cross to the front post.
Scotland Under-21 coach Scott Gemmill: "I was really pleased with the defensive side of the game today and the mental side and the application of the players today.
"They stepped up to the plate and gave a very solid performance.
"I think Fraser is one of the players who have benefitted from going to the Toulon tournament in the summer.
"He was up against really top teams in that environment and it's great that he has taken his opportunity of playing in a qualification game in Scotland."
Scotland Under-21 striker Fraser Hornby: "I thought it was a really good team performance.
"They were difficult to break down in the first half, but the goal just after the end of the first half came at a good time.
"We knew that going into the second half, if we kept playing, then more chances would come. We trusted our ability to create more chances and obviously the second half performance showed that.
"It's a very good side to play in as a striker. There are a lot of good players on either side and through the middle. I can get good service from all over the pitch."
Scotland U21: Fulton, Williamson, Bates, Porteous, Smith, Gilmour (Ferguson 78), Ross McCrorie, Mallan (Campbell 72), Cadden, Hornby (Shaw 85), Johnston.
Subs Not Used: Robby McCrorie, McIntyre, Ross, Magennis.
Booked: Smith, Bates, Hornby.
Goals: Hornby 45 pen, 70, 83.
Andorra U21: Iker, Pablos, Garcia, Viladot, Pomares, Claudi Bove (Pijuan 74), Reyes (Castillo 81), Samper, Nazzarro, Fernandez, Martinez (Vales 87).
Subs Not Used: Pires, Cabanes, Sanchez, Guillen.
Booked: Reyes, Nazzarro, Pomares, Martinez.
Referee: Dejan Jakimovski (Macedonia).